Module: KirguduRefs::ModelBasicProperties::BankID

Defined in:
app/helpers/kirgudu_refs/model_basic_properties.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



244
245
246
247
248
249
250
251
# File 'app/helpers/kirgudu_refs/model_basic_properties.rb', line 244

def self.included(base)
	base.belongs_to :bank, class_name: ::KirguduRefs::Finances::Bank, foreign_key: :bank_id
	base.scope :by_bank, lambda { |value| base.where(bank_id: value) if value }

	base.class_eval do
		include InstanceMethods
	end
end