lib/acts_as_changesetable/acts/changeable.rb
# Call to synchronize the changeable with the a version in history, default to latest revision
# (can be used in case where we add change histories by other means - synchronization with 
# a device, for instance) 
# 
# This call does not save automatically. Use sync_changeable! to do that.
# Note that in using this call, you must be careful not to make other changes, since
# no_history will be set to true
Call to synchronize the changeable with the a version in history, default to latest revision
(can be used in case where we add change histories by other means - synchronization with
a device, for instance)

This call does not save automatically.
Call to synchronize the changeable with the a version in history default to latest revision ( can be used in case where we add change histories by other means - synchronization with a device for instance ) This call does not save automatically .
def sync_changeable(history = false)
      history = self.latest_change unless history
      for field in self.changeable_fields
        self.send("#{field}=", history.send(field))
      end
      unless self.changesetable_options.no_copy_timestamps?
        self.updated_at = history.updated_at if(self.respond_to?(:updated_at) && history.respond_to?(:updated_at))
        self.created_at = history.created_at if(self.respond_to?(:created_at) && history.respond_to?(:created_at))
      end
      unless self.changesetable_options.no_copy_deleted?
        self.deleted_at = history.deleted_at if(self.respond_to?(:deleted_at) && history.respond_to?(:deleted_at))
      end
      self.no_history = true
      return self
    end
def sync_changeable ( history = false ) history = self . latest_change unless history for field in self . changeable_fields self . send ( "#{field}=" , history . send ( field ) ) end unless self . changesetable_options . no_copy_timestamps? self . updated_at = history . updated_at if ( self . respond_to? ( :updated_at ) && history . respond_to? ( :updated_at ) ) self . created_at = history . created_at if ( self . respond_to? ( :created_at ) && history . respond_to? ( :created_at ) ) end unless self . changesetable_options . no_copy_deleted? self . deleted_at = history . deleted_at if ( self . respond_to? ( :deleted_at ) && history . respond_to? ( :deleted_at ) ) end self . no_history = true return self end
Call to synchronize the changeable with the a version in history, default to latest revision
(can be used in case where we add change histories by other means - synchronization with
a device, for instance)
Call to synchronize the changeable with the a version in history default to latest revision ( can be used in case where we add change histories by other means - synchronization with a device for instance )
history
<not_specific>