mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user