The selection box sends the id of Genre and display a string for the user to make a selection. Do tail -f log/development.log, look at the params hash to see what is passed to the server. It looks like you have String that is supposed to be Genre.
Look at the line number that is related to your app in the stack trace.
It's the original method that was created using script/generate
scaffold...
That's pretty much what I figured. The scaffolded method didn't anticipate
you were going to do a 'nested' save. It doesn't know how to translate the
params strings into a Genera object via the update_attributes method.
You'll need to help it along.
The scaffolded method didn't
anticipate
you were going to do a 'nested' save. It doesn't know how to translate
the
params strings into a Genera object via the update_attributes method.
You'll need to help it along.
Best regards,
Bill
Thanks, but I can't remember that I had to do this ever before?! Is this
a new "feature" in Rails (didn't use Rails for some months now, and now
I updated to the newest version)...? Looks like a big step back to
me...?!
The scaffolded method didn't
anticipate
you were going to do a 'nested' save. It doesn't know how to translate
the
params strings into a Genera object via the update_attributes method.
You'll need to help it along.
Best regards,
Bill
Thanks, but I can't remember that I had to do this ever before?! Is this
a new "feature" in Rails (didn't use Rails for some months now, and now
I updated to the newest version)...? Looks like a big step back to
me...?!
Found the problem: I had f.select(:genre) in the view instead of
f.select(:genre_id)... Thanks anyway, folks!