user730569
user730569

Reputation: 4004

Where's my syntax error?

SyntaxError in Videos#show

Showing /rubyprograms/dreamstill/app/views/videos/show.html.erb where line #54 raised:

compile error
/Library/Ruby/Gems/1.8/gems/activemodel-3.0.4/lib/active_model/attribute_methods.rb:272: syntax error, unexpected ')'
/Library/Ruby/Gems/1.8/gems/activemodel-3.0.4/lib/active_model/attribute_methods.rb:273: syntax error, unexpected '?', expecting $end
Extracted source (around line #54):

51:         <%= link_to "Show Song", '#', :id => 'video_show_link', :class => 'edit' %>
52:     
53:         <div id="showable_video_div">
54:             <%= form_for [@video, @video.showable_videos.new ], :url => showable_videos_path, :remote => true do |f| %>
55:                 <%= f.hidden_field :video_id, :value => @video.id, :id => "video_id_field" %>
56:                 <%= f.text_field :user, :class => "showable_field" %>
57:             <% end %>

This is the migration to the showable_videos table that I did right before the error was thrown:

class AddUpvotedAndSeenToShowableVideos < ActiveRecord::Migration
  def self.up
    add_column :showable_videos, :upvoted?, :boolean
    add_column :showable_videos, :seen?, :boolean
  end

  def self.down
    remove_column :showable_videos, :seen?
   remove_column :showable_videos, :upvoted?
  end
end

Upvotes: 1

Views: 317

Answers (1)

user730569
user730569

Reputation: 4004

I just undid the migration above and then ran the migration again without the ? in the column names. I no longer get the syntax error.

Upvotes: 1

Related Questions