Skip to content

Commit

Permalink
Recover perf for pluck by reverting 9c9c950.
Browse files Browse the repository at this point in the history
This reverts commit 9c9c950.
  • Loading branch information
tgxworld committed May 3, 2019
1 parent 9b0e632 commit 25f1e0e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions activemodel/lib/active_model/type/integer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ def type
: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)
Expand Down

0 comments on commit 25f1e0e

Please sign in to comment.