• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help in displaying result

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Never mind. I am able to figure out.
reply
    Bookmark Topic Watch Topic
  • New Topic