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
-- 
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