On Nov 4, 9:46 am, sw0rdfish <[EMAIL PROTECTED]> wrote: > Ok here's a quicky... but a goody :) > > We have models Company, Reference and Applicant... and References and > Applicants just inherit from Company, and are basically companies with > the type field set to reference... > > All companies can have a phone number associated with them, and phone > number is a different model... > > I'm having trouble using the form_for method with a company that > happens to be an Applicant... > > form_for( [ @company, @phone_number] ) > > tries to use the route applicant_phone_number however the only route > that exists is company_phone_number, which is the one I want to use...
Yup, using an array in form_for doesn't work in STI situations like you've got. You'll have to do something like: form_for :company_phone_number_path(@company, @phone_number) Jeff www.purpleworkshops.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 -~----------~----~----~----~------~----~------~--~---

