Module: Cequel::Record::Dirty

Extended by:
ActiveSupport::Concern
Defined in:
lib/cequel/record/dirty.rb

Overview

Cequel provides support for dirty attribute tracking via ActiveModel. Modifications to collection columns are registered by this mechanism.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#save(options = {}) ⇒ Object

Since:

  • 0.1.0



47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/cequel/record/dirty.rb', line 47

def save(options = {})
  super.tap do |success|
    if success
      if self.respond_to?(:changes_applied)
        changes_applied
      else
        @previously_changed = changes
        @changed_attributes.clear
      end
    end
  end
end