method

initialize_dup

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: ActiveModel::Dirty
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 activemodel/lib/active_model/dirty.rb, line 132
    def initialize_dup(other) # :nodoc:
      super
      if self.class.respond_to?(:_default_attributes)
        @attributes = self.class._default_attributes.map do |attr|
          attr.with_value_from_user(@attributes.fetch_value(attr.name))
        end
      end
      @mutations_from_database = nil
    end
Register or log in to add new notes.