method

init_attributes

Importance_0
v8.1.1 - Show latest stable - 0 notes - Class: Core
init_attributes(_) 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 564
    def init_attributes(_) # :nodoc:
      attrs = @attributes.deep_dup

      if self.class.composite_primary_key?
        @primary_key.each { |key| attrs.reset(key) }
      else
        attrs.reset(@primary_key)
      end

      attrs
    end
Register or log in to add new notes.