Forum: Ruby on Rails Get an object other than primary key ID

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
karthik chigurupati (Guest)
on 2008-10-31 10:24
(Received via mailing list)
         i want to retrieve and object from a table other than primary
key ID.

eg:     @sites.each do |@site|
          @site_id =
          @tower = Tower.find(:all, :conditions => ["site_id =?",

Tower Belongs to Site. so Site_id is a reference in tower object.
there will be only one Tower object for Site Object.

Should we give relation as has_obne in site model??

help me ot.

This topic is locked and can not be replied to.