Module: Upkeep::Runtime::AttributeObserver
- Defined in:
- lib/upkeep/runtime.rb
Instance Method Summary collapse
Instance Method Details
#_read_attribute(attr_name, &block) ⇒ Object
778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 |
# File 'lib/upkeep/runtime.rb', line 778 def _read_attribute(attr_name, &block) value = super return value unless Observation.recording? dependency = Dependencies::ActiveRecordAttribute.new( table: self.class.table_name, model: self.class.name, id: primary_key_value(attr_name, value), attribute: attr_name.to_s ) Observation.record_dependency(dependency) value end |