Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make all tinyint(1) variants act like boolean in mysql (tinyint(1) un…

…signed, etc.)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit d712310518dcfe42966e7de936794c9a816b0e21 1 parent 795c71f
@jamis jamis authored
View
2  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]
View
2  activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -42,7 +42,7 @@ module ConnectionAdapters
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
Please sign in to comment.
Something went wrong with that request. Please try again.