提交 d7123105 编写于 作者: J Jamis Buck

Make all tinyint(1) variants act like boolean in mysql (tinyint(1) unsigned, etc.)


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 795c71f2
*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]
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册