Ruby on Rails Sunday, May 28, 2017

I wanna add a dropdown menu to my index view for the index action of my artists_controller Trying to use collection_select but it responds undefined method `collection_select' for nil:NilClass The idea is to list artists by genre

<div class="field"> <%= f.collection_select( :artist, :genre, Genre.all, :id, :name) %> </div>

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment