Sha256: d5e949e44d8c7515ff6312915e2eabbcb5ee5c11b10fffedf71ab67be497bfe6
Contents?: true
Size: 439 Bytes
Versions: 40
Compression:
Stored size: 439 Bytes
Contents
module ActiveModel module Dirty def can_change_primary_key? true end def primary_key_changed? !!changed.detect { |key| ids_hash.keys.include?(key.to_s) } end def primary_key_was ids_hash.keys.inject(Hash.new) do |result, attribute_name| result[attribute_name] = attribute_was(attribute_name.to_s) result end end alias_method :ids_hash_was, :primary_key_was end end
Version data entries
40 entries across 40 versions & 1 rubygems