Sha256: ddbf5966e86ffa48544602aecbdd8d6e1dbab02ebf0c819605bed1c1a303bccc
Contents?: true
Size: 678 Bytes
Versions: 15
Compression:
Stored size: 678 Bytes
Contents
module CassandraObject module AttributeMethods module Dirty extend ActiveSupport::Concern include ActiveModel::Dirty # Attempts to +save+ the record and clears changed attributes if successful. def save(*) #:nodoc: status = super changes_applied status end # <tt>reload</tt> the record and clears changed attributes. def reload super clear_changes_information self end def write_attribute(name, value) name = name.to_s old = read_attribute(name) self.send("#{name}_will_change!") unless value == old super end end end end
Version data entries
15 entries across 15 versions & 1 rubygems