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

Change LockingType to use DelegateClass

Significantly faster than `SimpleDelegator`.
This commit is contained in:
Sean Griffin 2015-02-09 10:18:22 -07:00
parent 20649697ce
commit a2c80a8945

View file

@ -184,7 +184,7 @@ module ActiveRecord
end
end
class LockingType < SimpleDelegator # :nodoc:
class LockingType < DelegateClass(Type::Value) # :nodoc:
def type_cast_from_database(value)
# `nil` *should* be changed to 0
super.to_i