We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a8a72f5 + 7d69f24 commit df99121Copy full SHA for df99121
activemodel/lib/active_model/dirty.rb
@@ -252,7 +252,7 @@ def initialize_dup(other) # :nodoc:
252
253
def init_attributes(other) # :nodoc:
254
attrs = super
255
- if other.persisted? && self.class.respond_to?(:_default_attributes)
+ if self.class.respond_to?(:_default_attributes)
256
self.class._default_attributes.map do |attr|
257
attr.with_value_from_user(attrs.fetch_value(attr.name))
258
end
0 commit comments