Displaying 1 result from an estimated 1 matches for "municipality_id".
2009 Oct 19
1
Combobox population by means of JQuery and Ajax.
This is the view municipalities.js.erb I have:
<% list_opt = options_from_collection_for_select(@municipalities, :id,
:name) %>
<% puts list_opt %> #ok! list_opt contains the options
$(''#municipality_id'').html(''<%= list_opt %>'');
and this is the combobox in the view:
...
Comune <select id="event_municipality_id"
name="event[municipality_id]"></select>
...
if instead of ''<%= list_opt %>'' I manually assign the...