Sha256: 030c85bebaf5993363bb599c35240befe3ccd0f6a1dd1aeaebe5c1a655795444

Contents?: true

Size: 409 Bytes

Versions: 1

Compression:

Stored size: 409 Bytes

Contents

module TrackChanges
   module Changes #:nodoc:

    protected

    def track_changes_get_changes
      @__model_changes = self.changes
    end

    def track_changes_save_audit
      return unless self.id && !@__model_changes.empty?

      user = current_user || TrackChanges::Configuration::get_default_user
      Audit.create_changes(self, @__model_changes, current_user)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
track_changes-1.0.1 lib/track_changes/changes.rb