Hi
I have the models company,country, state
company belongs_to country
country has_many states
state belongs_to country
In my company creation view i have two select boxes for country
and state. I could implement the country select like
<% form_for @company do |f| %>
<%= f.collection_select :country_id, Country.all, :id,:name,{},{} %>
---
Upon submit country is save with company .This is working. Now I
dont know how to populate the state And also I have to change the state
select box according to change in country.Please guide me
Thanks
Tom
--
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.