This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "help in displaying result " Watch "help in displaying result " New topic
Author

help in displaying result

megan smith
Greenhorn

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
Greenhorn

Joined: Nov 30, 2009
Posts: 22
Never mind. I am able to figure out.
 
 
subject: help in displaying result
 
Similar Threads
How to select column names using JP QL or however possible
Simple But Crazy Cascade Problem
Ruby on Rails question: yaml problem with scaffold generation
mvc artitecture
Read specific String value from File....Help..