Displaying 1 result from an estimated 1 matches for "shipped_from_id".
2006 Feb 24
4
Problem having two belongs_to of the same class type
...ActiveRecord::Base
belongs_to :shipped_to,
:class_name => ''Branch'',
:foreign_key => ''shipped_to_id''
belongs_to :shipped_from,
:class_name => ''Branch'',
:foreign_key => ''shipped_from_id''
end
branch.rb
------------------------------------------------
class Branch < Entity
has_many :shipped_to,
:class_name => ''Shipment'',
:order => ''updated_on DESC'',
:foreign_key => ''shipped_to_id...