Module: Sequel::Plugins::StoreAccessors::InstanceMethods
- Defined in:
- lib/sequel/plugins/store_accessors.rb
Instance Method Summary collapse
- #after_create ⇒ Object
- #after_update ⇒ Object
- #calculate_initial_store ⇒ Object
- #changed_columns ⇒ Object
Instance Method Details
#after_create ⇒ Object
68 69 70 71 |
# File 'lib/sequel/plugins/store_accessors.rb', line 68 def after_create super refresh_initial_store end |
#after_update ⇒ Object
63 64 65 66 |
# File 'lib/sequel/plugins/store_accessors.rb', line 63 def after_update super refresh_initial_store end |
#calculate_initial_store ⇒ Object
73 74 75 |
# File 'lib/sequel/plugins/store_accessors.rb', line 73 def calculate_initial_store @store_values_hashes || refresh_initial_store end |
#changed_columns ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/sequel/plugins/store_accessors.rb', line 77 def changed_columns changed = super return changed unless respond_to?(:store_columns) changed = changed.dup if frozen? store_columns.each do |col| match = patched(col).empty? && deleted(col).empty? if changed.include?(col) changed.delete(col) if match else changed << col unless match end end changed end |