Module: ActiveRecord::Core
- Defined in:
- lib/composite_primary_keys/core.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#initialize_dup(other) ⇒ Object
:nodoc:.
Instance Method Details
#initialize_dup(other) ⇒ Object
:nodoc:
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/composite_primary_keys/core.rb', line 3 def initialize_dup(other) # :nodoc: @attributes = @attributes.deep_dup # CPK #@attributes.reset(@primary_key) Array(self.class.primary_key).each {|key| @attributes.reset(key)} _run_initialize_callbacks @new_record = true @destroyed = false @_start_transaction_state = nil @transaction_state = nil super end |