diff options
Diffstat (limited to 'activerecord/lib/active_record/type/integer.rb')
-rw-r--r-- | activerecord/lib/active_record/type/integer.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/type/integer.rb b/activerecord/lib/active_record/type/integer.rb index 2ab2402dfd..2a1b04ac7f 100644 --- a/activerecord/lib/active_record/type/integer.rb +++ b/activerecord/lib/active_record/type/integer.rb @@ -16,13 +16,13 @@ module ActiveRecord :integer end - def type_cast_from_database(value) + def deserialize(value) return if value.nil? value.to_i end - def type_cast_for_database(value) - result = type_cast(value) + def serialize(value) + result = cast(value) if result ensure_in_range(result) end |