search for: inverse_match

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

Did you mean: inverse_matches
2013 Feb 23
0
where condition having no association
Rails 3.2.11 My app has a model called Plan, which has has_many self-referential association just like http://railscasts.com/episodes/163-self-referential-association has_many :matches has_many :counterparts, :through => :matches has_many :inverse_matches, :class_name => "Match", :foreign_key => :counterpart_id has_many :inverse_counterparts, :through => :inverse_matches, :source => :plan and in the plans_controller, I would like to find a plan (counterpart) having many conditions. plans = Plan.arel_table...