This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Ruby and the fly likes help in displaying result Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "help in displaying result " Watch "help in displaying result " New topic

help in displaying result

megan smith

Joined: Nov 30, 2009
Posts: 22
I need help in displaying the result from two table joined by reference.

Below are the steps I did.

1. ruby/scrips generate model specialty specialty_name:string

1. ruby/scrips generate model doctor doctor_name:string specialty:reference

2. loaded data through fixtures ( in doctor yml file i give doctor_name and specialty ref)

3. when i do Doctor.all :joins => :Specialty in ruby console
I 'm getting only doctor names not specialty of each doctor.

So how do i get the specialty names?

megan smith

Joined: Nov 30, 2009
Posts: 22
Never mind. I am able to figure out.
I agree. Here's the link:
subject: help in displaying result
It's not a secret anymore!