search for: construct_join_attribut

Displaying 1 result from an estimated 1 matches for "construct_join_attribut".

2007 Jan 05
1
(Enhancement?) for self referential has_many :through, w/ scoped create...
..._name => ''Connection'', :foreign_key => "source_user_id", :conditions => "connection_type = ''f''" has_many :friends, :through => :friendships, :source => :target_user do def construct_join_attributes(associate) super.merge({:connection_type => ''f''}) end end This enables the << operator to work as expected. The problem is that :construct_join_attributes is a protected method and this just doesn''t feel like something that should be overridd...