Sha256: 44c0f3972fbe9d6a30b8dc0c1c5869e8896390aa6046db2ed6e34218d18a9d49
Contents?: true
Size: 545 Bytes
Versions: 9
Compression:
Stored size: 545 Bytes
Contents
module ActiveRecord module AttributeMethods module PrimaryKey # Returns the primary key previous value. def id_was sync_with_transaction_state # CPK #attribute_was(self.class.primary_key) if self.composite? self.class.primary_keys.map do |key_attr| attribute_changed?(key_attr) ? changed_attributes[key_attr] : self.ids_hash[key_attr] end else attribute_was(self.class.primary_key) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems