Sha256: 2ff485b381d1ffc3d37ed573838683855924075f2e9ece4bc56250c735d2dcba
Contents?: true
Size: 604 Bytes
Versions: 9
Compression:
Stored size: 604 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 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
9 entries across 9 versions & 2 rubygems