Module: StoreModel::Base
- Includes:
- ParentAssignment
- Defined in:
- lib/store_model/ext/active_record/base.rb
Overview
ActiveRecord::Base patch with parent tracking support
Instance Method Summary collapse
Instance Method Details
#_read_attribute ⇒ Object
10 11 12 13 14 |
# File 'lib/store_model/ext/active_record/base.rb', line 10 def _read_attribute(*) value = super assign_parent_to_store_model_relation(value) if store_model_attribute?(value) value end |
#_write_attribute ⇒ Object
16 17 18 19 20 |
# File 'lib/store_model/ext/active_record/base.rb', line 16 def _write_attribute(*) value = super assign_parent_to_store_model_relation(value) if store_model_attribute?(value) value end |