method

initialize_dup

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: Core
initialize_dup(other) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/core.rb, line 525
    def initialize_dup(other) # :nodoc:
      @attributes = @attributes.deep_dup
      if self.class.composite_primary_key?
        @primary_key.each { |key| @attributes.reset(key) }
      else
        @attributes.reset(@primary_key)
      end

      _run_initialize_callbacks

      @new_record               = true
      @previously_new_record    = false
      @destroyed                = false
      @_start_transaction_state = nil

      super
    end
Register or log in to add new notes.