The coffeescript in this railscast specifies the IDs of the html select option lists:
states = $('#person_state_id').html()
However, I am using nested forms, which generate new form fields, and their IDs, dynamically. For instance:
book_extents_attributes_new_extents_extent_value_input
or
book_measurements_attributes_2_measure_type_input
How do I generate those IDs on the fly?
A kind fellow helped me out: here’s a solution.
#view partial for nested form fields, as per railscast.
#application.js or somewhere in the asset pipeline