aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/errors.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index c6535082d3..4a0ad618bc 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -78,6 +78,11 @@ module ActiveModel
@messages = ActiveSupport::OrderedHash.new
end
+ def initialize_dup(other)
+ @messages = other.messages.dup
+ super
+ end
+
# Clear the messages
def clear
messages.clear