app/models/unidom/party/government_agency.rb in unidom-party-1.0.2 vs app/models/unidom/party/government_agency.rb in unidom-party-1.1
- old
+ new
@@ -3,16 +3,15 @@
class Unidom::Party::GovernmentAgency < ActiveRecord::Base
self.table_name = 'unidom_government_agencies'
include Unidom::Common::Concerns::ModelExtension
+ include Unidom::Party::Concerns::AsSourceParty
+ include Unidom::Party::Concerns::AsTargetParty
validates :name, presence: true, length: { in: 2..self.columns_hash['name'].limit }
belongs_to :supervision_region, polymorphic: true
-
- has_many :source_party_relations, class_name: 'Unidom::Party::PartyRelation', as: :target_party
- has_many :target_party_relations, class_name: 'Unidom::Party::PartyRelation', as: :source_party
scope :supervision_region_is, ->(region) { where supervision_region: region }
end