Module: ActiveSchema::ActiveRecord::ClassMethods
- Included in:
- ActiveRecord::Base
- Defined in:
- lib/active_schema/active_record/base.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(klass) ⇒ Object
4 5 6 7 8 |
# File 'lib/active_schema/active_record/base.rb', line 4 def self.extended(klass) klass.class_attribute :active_schema_activated klass.class_attribute :active_schema_configuration klass.active_schema_configuration = ActiveSchema.configuration end |
Instance Method Details
#active_schema ⇒ Object
10 11 12 13 14 15 |
# File 'lib/active_schema/active_record/base.rb', line 10 def active_schema if !active_schema_activated self.active_schema_activated = true active_schema_load_model end end |
#active_schema_load_model ⇒ Object
17 18 19 20 21 |
# File 'lib/active_schema/active_record/base.rb', line 17 def active_schema_load_model unless active_schema_configuration.skip_model.call(self) active_schema_configuration.feeder.model_loaded(self) end end |