_locations.html.erb
--------------------------
<p><%= label_tag :location %><br />
  <%= collection_select (:location_id, locations, :id, :location_name, 
{:prompt   => "Select an Location"}, {:onchange => 
"#{remote_function(:url  => {:action => "update_cities"}, :with => 
"'location_id='+value")}"}) %></p>
--------------------------

_cities.html.erb
--------------------------
<p><%= label_tag :city %><br />
<%= collection_select(:city_id, cities, :id, :city_name, {:prompt => 
"Select a City"}) %></p>
--------------------------

what to do with partials?

new error:

--------------------------
NoMethodError in Devise/registrations#new

Showing 
C:/projects/djob/app/views/devise/registrations/_locations.html.erb 
where line #2 raised:

undefined method `map' for :id:Symbol
Extracted source (around line #2):

1: <p><%= label_tag :location %><br />
2:   <%= collection_select (:location_id, locations, :id, 
:location_name, {:prompt   => "Select an Location"}, {:onchange => 
"#{remote_function(:url  => {:action => "update_cities"}, :with => 
"'location_id='+value")}"}) %></p>

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to