Module: KirguduRefs::ModelBasicProperties::CountryID
- Included in:
- Finances::Bank, Globe::City, Globe::Country, Globe::Region, Globe::State, Globe::Timezone, Shops::Manufacturer
- 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
89 90 91 92 93 94 95 96 |
# File 'app/helpers/kirgudu_refs/model_basic_properties.rb', line 89 def self.included(base) base.belongs_to :country, class_name: ::KirguduRefs::Globe::Country, foreign_key: :country_id base.scope :by_country, lambda { |value| base.where(country_id: value) if value } base.class_eval do include InstanceMethods end end |