aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type/serialized.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/type/serialized.rb')
-rw-r--r--activerecord/lib/active_record/type/serialized.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/type/serialized.rb b/activerecord/lib/active_record/type/serialized.rb
index 5b512433b0..17004b3593 100644
--- a/activerecord/lib/active_record/type/serialized.rb
+++ b/activerecord/lib/active_record/type/serialized.rb
@@ -2,6 +2,7 @@ module ActiveRecord
module Type
class Serialized < SimpleDelegator # :nodoc:
include Mutable
+ include Decorator
attr_reader :subtype, :coder
@@ -36,14 +37,13 @@ module ActiveRecord
end
def init_with(coder)
- @subtype = coder['subtype']
@coder = coder['coder']
- __setobj__(@subtype)
+ super
end
def encode_with(coder)
- coder['subtype'] = @subtype
coder['coder'] = @coder
+ super
end
private