하나의 부모로부터 동일한 자식에 대해 여러 개의 다형성 관계 (has_many_polymorphs plugin)를 정의하려고합니다. 참고 많은 시청자가 참고 많은 편집자가 어느 사용자 또는 그룹이 될 수 시청자 권한이 note_id, viewer_id, viewer_type, editor_id, editor_type 필드 협회의 모델 중 하나를 사용자 또는
Candidate과 다양한 유형의 많은 이벤트 사이에 has_many_polymorphs 관계가 있습니다. 특히 Candidate은 생성 될 때 Created 이벤트를 생성합니다. class Candidate < ActiveRecord::Base
has_many_polymorphs :events, :through => :candidate_event