Despite me specifying the default value in the controller,
collection_select doesnt seem to pick that up when rendering the html,
which defaults to the first option in the dropdown.
The first thing that sticks out is it should be :selection_id instead
of :selection.
Despite me specifying the default value in the controller,
collection_select doesnt seem to pick that up when rendering the html,
which defaults to the first option in the dropdown.
What idiot-simple thing am I missing?
And if that doesn’t fix it, then my only other suggestion would be to
make sure you have selection_id set as an integer in the database.
I’ve accidentally created a foreign key as a string before, which
works fine mostly, except when trying to do a select box and it’s
comparing integers to strings.
Hope that helps.
– Brandon
Training by Collective Idea: Ruby on Rails training in a vacation
setting http://training.collectiveidea.com – San Antonio, TX – Jan 20-23