Module: KirguduRefs::ModelBasicProperties::ContinentID
- Included in:
- Globe::Country
- 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
71 72 73 74 75 76 77 78 |
# File 'app/helpers/kirgudu_refs/model_basic_properties.rb', line 71 def self.included(base) base.belongs_to :continent, class_name: ::KirguduRefs::Globe::Continent, foreign_key: :continent_id base.scope :by_continent, lambda { |value| base.where(continent_id: value) if value } base.class_eval do include InstanceMethods end end |