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
# File 'lib/cequel/record/dirty.rb', line 47

def save(options = {})
  super.tap do |success|
    if success
      @previously_changed = changes
      @changed_attributes.clear
    end
  end
end