Sha256: 7c15094b887fbf4b55bc40406ccb9fe56e192a208fffe8173674db0810870964
Contents?: true
Size: 616 Bytes
Versions: 11
Compression:
Stored size: 616 Bytes
Contents
module CassandraObject module Dirty extend ActiveSupport::Concern include ActiveModel::Dirty module InstanceMethods def attributes_changed!(attributes) attributes.each do |attr_name| attribute_will_change!(attr_name) end end def save(options={}) super.tap { changed_attributes.clear } end def write_attribute(name, value) name = name.to_s unless attribute_changed?(name) old = read_attribute(name) changed_attributes[name] = old if old != value end super end end end end
Version data entries
11 entries across 11 versions & 1 rubygems