Dear all,
I tried to implement the code for 2 select boxes that are dependent on
each other. One has a list of countries, and one a list of states.
Now, this code works:
However, I want to place this inside my form_for. This code does not
work:
<% form_for (:trail, :url => { :action => “update”, :id =>
@trail }, :html => { :multipart => true }) do |form| %>
The view crashes with this error message:
ActionView::TemplateError (undefined method `merge’ for #<Array:
0x33d1b68>) on line #110 of app/views/trail_editor/edit.rhtml:
107:
108:
109:
110:
:order
=> ‘name ASC’).map {|x| [x.name, x.id]} %>
111:
112:
113:
to Trailhead:
Any help would be greatly appreciated.
Thank you,