Hi all,

I got association like the following in my rails app.
Class User < ActiveRecord::Base
  has_one :profile
end

Class Profile < ActiveRecord::Base
  establish_connection :some_other_db
  belongs_to :user
end

I need to search users based on the age stored in the profile
I tried using the :joins option of find. but it seems it works only on
tables in the same db.

Is there a way i can tell (:joins) to join a table from another db? Or is
there some other better way in which this could be achieved?

-- 
Sahil Dave

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to