aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-06-12 10:21:52 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-06-12 10:21:52 -0700
commit6522a127e549040d834196eea6eb2818e5051dba (patch)
tree1024b3785669a23fa8c2185d77dd5aae03e49a88 /activemodel/lib
parent0ccdeeb6b589b486f9ffdfb56cbbf901ec955d88 (diff)
parentb97e0a1127d45e25e4281d6c1b5fb9a57f0efea6 (diff)
downloadrails-6522a127e549040d834196eea6eb2818e5051dba.tar.gz
rails-6522a127e549040d834196eea6eb2818e5051dba.tar.bz2
rails-6522a127e549040d834196eea6eb2818e5051dba.zip
Merge pull request #6682 from acapilleri/dup_validation_fix_backport_for_1_9_3
Dup validation fix backport for 1 9 3
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/validations.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb
index 18cd53e130..f38121c175 100644
--- a/activemodel/lib/active_model/validations.rb
+++ b/activemodel/lib/active_model/validations.rb
@@ -168,8 +168,9 @@ module ActiveModel
# Clean the +Errors+ object if instance is duped
def initialize_dup(other) # :nodoc:
@errors = nil
+ super if defined?(super)
end
-
+
# Backport dup from 1.9 so that #initialize_dup gets called
unless Object.respond_to?(:initialize_dup)
def dup # :nodoc: