diff options
Diffstat (limited to 'activerecord/lib/active_record/attributes')
-rw-r--r-- | activerecord/lib/active_record/attributes/typecasting.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attributes/typecasting.rb b/activerecord/lib/active_record/attributes/typecasting.rb index de36a297eb..56c32f9895 100644 --- a/activerecord/lib/active_record/attributes/typecasting.rb +++ b/activerecord/lib/active_record/attributes/typecasting.rb @@ -37,6 +37,12 @@ module ActiveRecord hash.merge!(self) hash end + + def dup # :nodoc: + copy = super + copy.types = types.dup + copy + end # Provides a duplicate with typecasting disabled. # |