Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help in displaying result

 
megan smith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind. I am able to figure out.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic