diff options
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index b02626f4aa..beb8d8084b 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Make all tinyint(1) variants act like boolean in mysql (tinyint(1) unsigned, etc.) [Jamis Buck] + * Use association's :conditions when eager loading. [jeremyevans0@gmail.com] #4144 * Alias the has_and_belongs_to_many join table on eager includes. #4106 [jeremyevans0@gmail.com] diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index e0d1ac3b54..842126a991 100755 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -42,7 +42,7 @@ module ActiveRecord class MysqlColumn < Column #:nodoc: private def simplified_type(field_type) - return :boolean if MysqlAdapter.emulate_booleans && field_type.downcase == "tinyint(1)" + return :boolean if MysqlAdapter.emulate_booleans && field_type.downcase.index("tinyint(1)") super end end |