mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Boolean type casting creates fewer objects
This commit is contained in:
@@ -138,7 +138,7 @@ module ActiveRecord
|
||||
if value == true || value == false
|
||||
value
|
||||
else
|
||||
%w(true t 1).include?(value.to_s.downcase)
|
||||
!(value.to_s !~ /\A(?:1|t|true)\Z/i)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user