Displaying 1 result from an estimated 1 matches for "enrollment_merchants".
2006 Mar 31
3
Complex Through Statement
...#39;' has multiple ''Merchants'',
depending on their relationship. For example, the Employee may be the
enrollment contact for one merchant and the support contact for another.
Therefore, my Employee class looks like this:
class Employee < ActiveRecord::Base
has_many :enrollment_merchants, :class_name => "Merchant",
:foreign_key => :enrollment_employee_id
has_many :support_merchants, :class_name => "Merchant", :foreign_key
=> :support_employee_id
end
And my Merchant class looks like this:
class Merchant < ActiveRecord::Base
belongs_to :en...