File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Groovy Fundamentals video training course this week in the Groovy 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