Sha256: 1b3c73fdcd6cc9dda3467774c04f492882b287c16e3835bcb35fae99b02cd3a0
Contents?: true
Size: 544 Bytes
Versions: 7
Compression:
Stored size: 544 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
7 entries across 7 versions & 1 rubygems