[Rails] Re: undefined method `find_all'
i have modified my code as follows:
<%= collection_select(:category, :id, @categories, :id, :category_type,
options ={:prompt => "-Select a Category"}, :class =>"category") %>
i Hav also modified the definition in my controllers as follows:
@categories = category.find(:all)
You have a nil object when you didn't expect it!
> You might have expected an instance of Array.
> The error occurred while evaluating nil.map
seems there something i dont get
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home