L
Luis Teko
SyntaxError in Movie#new
compile error
D:/instant/rails_apps/videoondemand/app/views/movie/new.html.erb:8:
syntax error, unexpected ':', expecting ')'
_erbout.concat(( collection_selectmovie,:genre_id,@genres:id,:name)
).to_s); _erbout.concat "</p>\n"
^
D:/instant/rails_apps/videoondemand/app/views/movie/new.html.erb:8:
syntax error, unexpected ')', expecting tCOLON2 or '[' or '.'
_erbout.concat(( collection_selectmovie,:genre_id,@genres:id,:name)
).to_s); _erbout.concat "</p>\n"
^
Extracted source (around line #8):
5: <p><label for="movie_price">Price</label>:
6: <%= text_field 'movie', 'price' %></p>
7: <p><label for="movie_genre">Genre</label>:
8: <%= collection_selectmovie,:genre_id,@genres:id,:name) %></p>
9: <p><label for="movie_description">Description</label><br/>
10: <%= text_area 'movie', 'description' %></p>
11: <%= submit_tag "Create" %>
Trace of template inclusion: /movie/new.html.erb
RAILS_ROOT: D:/instant/rails_apps/videoondemand
Application Trace | Framework Trace | Full Trace
app/views/movie/new.html.erb:15:in `compile_template'
D:/instant/ruby/bin/mongrel_rails:19
Request
Parameters:
None
<%= form_tag :action => 'create' %>
<p><label for="movie_title">Title</label>:
<%= text_field 'movie', 'title' %></p>
<p><label for="movie_price">Price</label>:
<%= text_field 'movie', 'price' %></p>
<p><label for="movie_genre">Genre</label>:
<%= collection_selectmovie,:genre_id,@genres:id,:name) %></p>
<p><label for="movie_description">Description</label><br/>
<%= text_area 'movie', 'description' %></p>
<%= submit_tag "Create" %>
<%= link_to 'Back', {:action => 'list'} %>
class Movie < ActiveRecord::Base
belongs_to :genre
end
class Genre < ActiveRecord::Base
has_many :movies
end
compile error
D:/instant/rails_apps/videoondemand/app/views/movie/new.html.erb:8:
syntax error, unexpected ':', expecting ')'
_erbout.concat(( collection_selectmovie,:genre_id,@genres:id,:name)
).to_s); _erbout.concat "</p>\n"
^
D:/instant/rails_apps/videoondemand/app/views/movie/new.html.erb:8:
syntax error, unexpected ')', expecting tCOLON2 or '[' or '.'
_erbout.concat(( collection_selectmovie,:genre_id,@genres:id,:name)
).to_s); _erbout.concat "</p>\n"
^
Extracted source (around line #8):
5: <p><label for="movie_price">Price</label>:
6: <%= text_field 'movie', 'price' %></p>
7: <p><label for="movie_genre">Genre</label>:
8: <%= collection_selectmovie,:genre_id,@genres:id,:name) %></p>
9: <p><label for="movie_description">Description</label><br/>
10: <%= text_area 'movie', 'description' %></p>
11: <%= submit_tag "Create" %>
Trace of template inclusion: /movie/new.html.erb
RAILS_ROOT: D:/instant/rails_apps/videoondemand
Application Trace | Framework Trace | Full Trace
app/views/movie/new.html.erb:15:in `compile_template'
D:/instant/ruby/bin/mongrel_rails:19
Request
Parameters:
None
<h1>Add new movie</h1>heres my new.rhtm
<%= form_tag :action => 'create' %>
<p><label for="movie_title">Title</label>:
<%= text_field 'movie', 'title' %></p>
<p><label for="movie_price">Price</label>:
<%= text_field 'movie', 'price' %></p>
<p><label for="movie_genre">Genre</label>:
<%= collection_selectmovie,:genre_id,@genres:id,:name) %></p>
<p><label for="movie_description">Description</label><br/>
<%= text_area 'movie', 'description' %></p>
<%= submit_tag "Create" %>
<%= link_to 'Back', {:action => 'list'} %>
class Movie < ActiveRecord::Base
belongs_to :genre
end
class Genre < ActiveRecord::Base
has_many :movies
end