lib/acfs/model/dirty.rb in acfs-0.16.0 vs lib/acfs/model/dirty.rb in acfs-0.17.0

- old
+ new

@@ -5,32 +5,42 @@ # module Dirty extend ActiveSupport::Concern include ActiveModel::Dirty - # Resets all changes. Do not touch previous changes. + # @api private # + # Resets all changes. Does not touch previous changes. + # def reset_changes changed_attributes.clear end + # @api private + # # Save current changes as previous changes and reset # current one. # def swap_changes @previously_changed = changes reset_changes end - def save!(*) # :nodoc: - super.tap { |__| swap_changes } + # @api private + # + def save!(*) + super.tap { |_| swap_changes } end - def loaded! # :nodoc: + # @api private + # + def loaded! reset_changes super end + # @api private + # def write_raw_attribute(name, value, opts = {}) # :nodoc: attribute_will_change! name if opts[:change].nil? or opts[:change] super end end