app/views/category/new.erb
In this file , i have two line like this <!-- <p><label for="book_subject">Subject</label>: --> <!-- <%= collection_select(:book,:subject_id,@subjects,:id,:name) %></p> --> But, if these two lines are present , i get an error saying "you have an unexpected nil error" ---------------------------- here is the full file: app/views/category# more new* <h1>Add new Category </h1> <%= form_tag :action => 'create'%> <p><label for="category_title">Category Title</label>: <%= text_field 'category', 'category_title' %></p> <p><label for="categoy_short_desc">Category Short Description</label>: <%= text_field 'category', 'category_short_desc' %></p> <p><label for="categoy_long_desc">Category Long Description</label>: <%= text_area 'category', 'category_long_desc' %></p> <!-- <p><label for="book_subject">Subject</label>: --> <!-- <%= collection_select(:book,:subject_id,@subjects,:id,:name) %></p> --> <%= submit_tag "Create" %> <%= form_tag %> <%= link_to 'Back', {:action => 'list'} %> ----------------------- If i remove these two lines <!-- <p><label for="book_subject">Subject</label>: --> <!-- <%= collection_select(:book,:subject_id,@subjects,:id,:name) %></p> --> then new.erb works fine. Why so? Why can't comment these two lines? I'm sure there is some problem. But, i couldn't see what it is. please let me know if u could what the problem is in cmmenting these two lines. thanks, radha -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.