mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge the redundant when Symbol
case to the when String, ...
This commit is contained in:
parent
e9aa0c5c72
commit
7a4e20e0cd
1 changed files with 1 additions and 2 deletions
|
@ -159,7 +159,7 @@ module ActiveRecord
|
|||
|
||||
def _quote(value)
|
||||
case value
|
||||
when String, ActiveSupport::Multibyte::Chars
|
||||
when String, Symbol, ActiveSupport::Multibyte::Chars
|
||||
"'#{quote_string(value.to_s)}'"
|
||||
when true then quoted_true
|
||||
when false then quoted_false
|
||||
|
@ -170,7 +170,6 @@ module ActiveRecord
|
|||
when Type::Binary::Data then quoted_binary(value)
|
||||
when Type::Time::Value then "'#{quoted_time(value)}'"
|
||||
when Date, Time then "'#{quoted_date(value)}'"
|
||||
when Symbol then "'#{quote_string(value.to_s)}'"
|
||||
when Class then "'#{value}'"
|
||||
else raise TypeError, "can't quote #{value.class.name}"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue