I have a select form helper and an observe_field that's observing the
select and calling an action when the select changes. However, I'm
having trouble passing the right parameters from the select.
The select helper is inside of a form_for and looks like:
f.select(:name, @books)
When the post request occurs, I see that the right value parameter
from the select is passed, but is of the form: value => nil, which I
can't work with.
n.b., you'll have to look at the id in your HTML to make sure 'books_name' is right, but the documentation on observe_field is specific that the first argument is the DOM id of the field. If you are still getting nil values, try a second parameter to the hash: