Skip to content

Commit 7d69f24

Browse files
committed
Revert "Merge pull request rails#53330 from Shopify/active-model-dirty-skip-reset"
This reverts commit 0586c88, reversing changes made to 92410a1.
1 parent a8a72f5 commit 7d69f24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activemodel/lib/active_model/dirty.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def initialize_dup(other) # :nodoc:
252252

253253
def init_attributes(other) # :nodoc:
254254
attrs = super
255-
if other.persisted? && self.class.respond_to?(:_default_attributes)
255+
if self.class.respond_to?(:_default_attributes)
256256
self.class._default_attributes.map do |attr|
257257
attr.with_value_from_user(attrs.fetch_value(attr.name))
258258
end

0 commit comments

Comments
 (0)