module ActiveRecord::Locking::Optimistic::ClassMethods

def define_attribute(name, cast_type, **) # :nodoc:

:nodoc:
def define_attribute(name, cast_type, **) # :nodoc:
  if lock_optimistically && name == locking_column
    cast_type = LockingType.new(cast_type)
  end
  super
end