lib/active_remote/dirty.rb in active_remote-3.3.3 vs lib/active_remote/dirty.rb in active_remote-5.0.0.pre

- old
+ new

@@ -1,6 +1,6 @@ -require 'active_model/dirty' +require "active_model/dirty" # Overrides persistence methods, providing support for dirty tracking. # module ActiveRemote module Dirty @@ -30,11 +30,11 @@ end # Override #save to store changes as previous changes then clear them. # def save(*) - if status = super + if (status = super) @previously_changed = changes changed_attributes.clear end status @@ -47,10 +47,10 @@ @previously_changed = changes changed_attributes.clear end end - def skip_dirty_tracking(&block) + def skip_dirty_tracking disable_dirty_tracking yield enable_dirty_tracking