Fixed that MySQL enums should always be returned as strings (closes #3501) [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4028 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 4b66180c
*SVN*
* Fixed that MySQL enums should always be returned as strings #3501 [DHH]
* Change has_many :through to use the :source option to specify the source association. :class_name is now ignored. [Rick Olson]
class Connection < ActiveRecord::Base
......
......@@ -43,6 +43,7 @@ class MysqlColumn < Column #:nodoc:
private
def simplified_type(field_type)
return :boolean if MysqlAdapter.emulate_booleans && field_type.downcase.index("tinyint(1)")
return :string if field_type =~ /enum/i
super
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册