Displaying 1 result from an estimated 1 matches for "counterpart_id".
2013 Feb 23
0
where condition having no association
...l 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
@counterpart = Plan.where(
.....