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. --- activerecord/test/cases/column_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/column_test.rb') diff --git a/activerecord/test/cases/column_test.rb b/activerecord/test/cases/column_test.rb index c5d455f59c..15c23ea61d 100644 --- a/activerecord/test/cases/column_test.rb +++ b/activerecord/test/cases/column_test.rb @@ -146,7 +146,7 @@ module ActiveRecord if current_adapter?(:SQLite3Adapter) def test_binary_encoding - column = SQLite3Column.new("field", nil, SQLite3Binary.new) + column = Column.new("field", nil, SQLite3Binary.new) utf8_string = "a string".encode(Encoding::UTF_8) type_cast = column.type_cast(utf8_string) -- cgit v1.2.3