From 89401acff42e4baf7e3b2921995a2be316631837 Mon Sep 17 00:00:00 2001 From: Brian Lopez Date: Wed, 28 Jul 2010 14:54:33 -0700 Subject: [PATCH] make sure we tell AR the proper attribute types for SET and BIT fields as well --- lib/active_record/connection_adapters/mysql2_adapter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/active_record/connection_adapters/mysql2_adapter.rb b/lib/active_record/connection_adapters/mysql2_adapter.rb index 3de2d0e..13e847a 100644 --- a/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -86,8 +86,9 @@ module ActiveRecord private def simplified_type(field_type) return :boolean if Mysql2Adapter.emulate_booleans && field_type.downcase.index(BOOL) - return :string if field_type =~ /enum/i + return :string if field_type =~ /enum/i or field_type =~ /set/i return :integer if field_type =~ /year/i + return :binary if field_type =~ /bit/i super end