diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2016-04-23 17:27:09 -0600 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2016-04-23 17:27:09 -0600 |
commit | 17668cf5284e8d1682b9c8e9318b452519bb7e42 (patch) | |
tree | 094c89a2d6f777c9788f3fe0d61e0392111959b2 /activerecord/lib | |
parent | aa598f4f399c777cfda526e7cf229f3bcb4f7d9b (diff) | |
parent | 210729c4cc05eae875b1e990c5bce39dee23e8f1 (diff) | |
download | rails-17668cf5284e8d1682b9c8e9318b452519bb7e42.tar.gz rails-17668cf5284e8d1682b9c8e9318b452519bb7e42.tar.bz2 rails-17668cf5284e8d1682b9c8e9318b452519bb7e42.zip |
Merge pull request #24703 from vipulnsward/24695-handle-nils
Followup of #15771
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/locking/optimistic.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index 2336d23a1c..1040327a5d 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -190,6 +190,10 @@ module ActiveRecord super.to_i end + def serialize(value) + super.to_i + end + def init_with(coder) __setobj__(coder['subtype']) end |