code :

Area
<%= f.select :area_id, Area.all.collect {|p| [ p.name, p.id ] }, 
:class=>"small"  %>
Milk Mans
<%= f.select :milkman_id, Milkman.all.collect {|p| [ p.name, p.id ] }, 
:class=>"small"  %>

When i select any area then i should see only those milkmans of that area.
Till now i getting all milkmans in my select box. 

How to do this with Ajax ?

Hope u will understand  question now ?

On Monday, September 24, 2012 5:31:33 PM UTC+5:30, Fahim Patel wrote:
>
>
>
> I wish to select one value from drop down and second drop down should 
> shows those values which are related to that  selected value 
> from first drop down.
>
> It should be dynamic ?
>
> Did i have to use Ajax ?
>
>

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/LAs9AGcnuyQJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to