mirror of
https://github.com/github/rails.git
synced 2026-02-17 01:21:42 -05:00
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
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*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 @@ module ActiveRecord
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user