wiz561-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-04 15:44 UTC
Newbie question on relationships and displaying them
Hi! I''m just starting out with Ruby on Rails, so forgive me since this is probably so easy. I have two databases. The first one has the following columns... table: division pk_division_id (primary key) name (string) The other database has... table: incidents ...different rows.... division_id (integer) I was able to modify the _form.rhtml file so that it displays the division.name in a drop down box, and then takes the pk_division_id number and fills it into the division_id column in the incidents table. Now what I would like to do is in the "Listing" screen for listing all the incidents, I want to be able to show the name from the division table which relates to the division_id in the incidents table....if that makes sense. Any help is appreciated!!! Thanks, Mike --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---