Hello,
         i want to retrieve and object from a table other than primary
key ID.

eg:     @sites.each do |@site|
          @site_id = @site.id
          @tower = Tower.find(:all, :conditions => ["site_id =?",
@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.

Karthik

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to