hey, i have a model called continents, that has a name and an id, anyone
know why this doesnt work

<%= collection_select(:continent, :name, @continents, :id, :name),

but this does

<%= collection_select(:continent, :id, @continents, :id, :name), many

The first results in a:

undefined method `name’ for #Array:0x22cff08


Fixed it myself, i actually put the correct code in this post, in my
app, i had @continent, instead of @continents, didnt realise it was
plural sensitive.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs