It's not entirely clear why specifying the foreign key explicitly fixes this - the value given is what it should default to - but without this it finds the child relation instead when looking at the parents of a relation. Fixes #789
7 lines
241 B
Ruby
7 lines
241 B
Ruby
class RelationMember < ActiveRecord::Base
|
|
self.table_name = "current_relation_members"
|
|
self.primary_keys = "relation_id", "sequence_id"
|
|
|
|
belongs_to :relation, :foreign_key => :relation_id
|
|
belongs_to :member, :polymorphic => true
|
|
end
|