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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs