From e781aa31fc52a7c696115302ef4d4e02bfd1533b Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Tue, 20 May 2014 09:15:22 -0700 Subject: Replace `type_cast` case statement with delegation All subclasses of column were now delegating `type_cast` to their injected type object. We can remove the overriding methods, and generalize it on the `Column` class itself. This also enabled us to remove several column classes completely, as they no longer had any meaningful behavior of their own. --- .../lib/active_record/connection_adapters/postgresql/column.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/postgresql') diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/column.rb b/activerecord/lib/active_record/connection_adapters/postgresql/column.rb index 1dd8acc257..e5118b5427 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/column.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/column.rb @@ -123,13 +123,6 @@ module ActiveRecord end end - def type_cast(value) - return if value.nil? - return super if encoded? - - @oid_type.type_cast value - end - def accessor @oid_type.accessor end -- cgit v1.2.3