Module: Citier::InstanceMethods::ForcedWriters
- Defined in:
- lib/citier/instance_methods.rb
Instance Method Summary collapse
- #force_attributes(new_attributes, options = {}) ⇒ Object
- #force_changed_attributes(new_changed_attributes, options = {}) ⇒ Object
Instance Method Details
#force_attributes(new_attributes, options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/citier/instance_methods.rb', line 8 def force_attributes(new_attributes, = {}) new_attributes = @attributes.merge(new_attributes) if [:merge] @attributes = new_attributes if [:clear_caches] != false @aggregation_cache = {} @association_cache = {} @attributes_cache = {} end end |
#force_changed_attributes(new_changed_attributes, options = {}) ⇒ Object
19 20 21 22 |
# File 'lib/citier/instance_methods.rb', line 19 def force_changed_attributes(new_changed_attributes, = {}) new_changed_attributes = @attributes.merge(new_changed_attributes) if [:merge] @changed_attributes = new_changed_attributes end |