Ruby on Rails Tuesday, May 30, 2017

I'm creating a new PressRelease  the PressRelease model has no club_id column it has columns like venue, venue_city, venue_state, etc. I wanna add a collection_select to the form to get a club_id into the params from the Club model How should my collection_select be constructed I have something like  <%= f.collection_select(:club_id, Club.all, :id, :club, prompt: true) %> but this causes an undefined method 'club_id' error

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