I’m just getting started with RoR and need some help with setting up the
following scenario.
I have three models:- Jobs, Clients and Contacts
A job has one Client which, in turn, has many contacts.
When I’m creating a new job I would like a popup menu so the user can
choose the client.
Having done this, I would then like another popup menu to only show the
contacts
for the client selected.
I have the first popup done using:-
<%= select(“client”,“client_id”, Client.find(:all).collect {|c| [c.name,
c.id]}) %>
I’m stuck on how I would populate the contacts menu based on the client
selection.
Any help would be much appreciated!
Cheers
Paul