Add merged_into association for Supporter

This commit is contained in:
Eric Schultz 2019-01-18 16:50:02 -06:00 committed by Eric Schultz
parent 78659cfcb7
commit 1392186728

View file

@ -48,6 +48,7 @@ class Supporter < ActiveRecord::Base
has_many :tag_masters, through: :tag_joins
has_many :custom_field_joins, dependent: :destroy
has_many :custom_field_masters, through: :custom_field_joins
belongs_to :merged_into, class_name: 'Supporter', :foreign_key => 'merged_into'
validates :nonprofit, :presence => true
scope :not_deleted, -> {where(deleted: false)}