diff options
Diffstat (limited to 'activerecord')
4 files changed, 0 insertions, 28 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb index 565ecddde5..90c36e4b02 100644 --- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb +++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb @@ -2,8 +2,6 @@ module ActiveRecord module AttributeMethods module TimeZoneConversion class TimeZoneConverter < DelegateClass(Type::Value) # :nodoc: - include Type::Decorator - def type_cast_from_database(value) convert_time_to_time_zone(super) end diff --git a/activerecord/lib/active_record/type.rb b/activerecord/lib/active_record/type.rb index 5678b9c84c..1f978a17c5 100644 --- a/activerecord/lib/active_record/type.rb +++ b/activerecord/lib/active_record/type.rb @@ -1,5 +1,4 @@ require 'active_record/type/helpers' -require 'active_record/type/decorator' require 'active_record/type/mutable' require 'active_record/type/numeric' require 'active_record/type/time_value' diff --git a/activerecord/lib/active_record/type/decorator.rb b/activerecord/lib/active_record/type/decorator.rb deleted file mode 100644 index 9fce38ea44..0000000000 --- a/activerecord/lib/active_record/type/decorator.rb +++ /dev/null @@ -1,14 +0,0 @@ -module ActiveRecord - module Type - module Decorator # :nodoc: - def init_with(coder) - @subtype = coder['subtype'] - __setobj__(@subtype) - end - - def encode_with(coder) - coder['subtype'] = __getobj__ - end - end - end -end diff --git a/activerecord/lib/active_record/type/serialized.rb b/activerecord/lib/active_record/type/serialized.rb index 3cac03464e..c1ca5fd936 100644 --- a/activerecord/lib/active_record/type/serialized.rb +++ b/activerecord/lib/active_record/type/serialized.rb @@ -2,7 +2,6 @@ module ActiveRecord module Type class Serialized < DelegateClass(Type::Value) # :nodoc: include Mutable - include Decorator attr_reader :subtype, :coder @@ -36,16 +35,6 @@ module ActiveRecord ActiveRecord::Store::IndifferentHashAccessor end - def init_with(coder) - @coder = coder['coder'] - super - end - - def encode_with(coder) - coder['coder'] = @coder - super - end - private def default_value?(value) |