1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Recover perf for pluck by reverting 9c9c950d02.

This reverts commit 9c9c950d02.
This commit is contained in:
Guo Xiang Tan 2019-05-03 22:24:52 +08:00
parent 9b0e632def
commit 25f1e0e3ea

View file

@ -18,6 +18,11 @@ module ActiveModel
:integer
end
def deserialize(value)
return if value.blank?
value.to_i
end
def serialize(value)
return if value.is_a?(::String) && non_numeric_string?(value)
ensure_in_range(super)