Displaying 1 result from an estimated 1 matches for "acrticl".
Did you mean:
acrticle
2008 Sep 16
3
has_one :through eager-loading problem
...e :include option in find for my
has_one :through association.
I have Users, Profiles and Customers, all connected to each other with
a has_one :through => :membership association like this:
class Profile < ActiveRecord::Base #could also be user or customer
has_one :membership # i saw an acrticle of Ryan about
has_one :through, there this would be has_many, is this wrong?
has_one :user, :through => :membership
has_one :customer, :through => :membership
end
now if I search for profiles with the :include option:
def index
@profiles = User.find(:all, :include => [:user, :cus...