diff options
author | Eric Chapweske <eric@chapweske.com> | 2009-10-18 10:22:22 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-18 10:22:22 -0500 |
commit | 2831996483c6a045f1f38d8030256eb58d9771c3 (patch) | |
tree | 39c70042e40fe0fbed98981b5bfdfc542dc023f5 /activerecord/lib/active_record | |
parent | 6873b1d6589c0e8f1c29f156fb1841e165f3a127 (diff) | |
download | rails-2831996483c6a045f1f38d8030256eb58d9771c3.tar.gz rails-2831996483c6a045f1f38d8030256eb58d9771c3.tar.bz2 rails-2831996483c6a045f1f38d8030256eb58d9771c3.zip |
Fixed: #without_typecast should only disable typecasting on the duplicated attributes [#3387 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'activerecord/lib/active_record')
-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. # |