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:
parent
9b0e632def
commit
25f1e0e3ea
1 changed files with 5 additions and 0 deletions
|
@ -18,6 +18,11 @@ module ActiveModel
|
||||||
:integer
|
:integer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def deserialize(value)
|
||||||
|
return if value.blank?
|
||||||
|
value.to_i
|
||||||
|
end
|
||||||
|
|
||||||
def serialize(value)
|
def serialize(value)
|
||||||
return if value.is_a?(::String) && non_numeric_string?(value)
|
return if value.is_a?(::String) && non_numeric_string?(value)
|
||||||
ensure_in_range(super)
|
ensure_in_range(super)
|
||||||
|
|
Loading…
Reference in a new issue