aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type/unsigned_integer.rb
blob: 45f5dc506e62bf8ae67fabd117716292e6658636 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true
module ActiveRecord
  module Type
    class UnsignedInteger < ActiveModel::Type::Integer # :nodoc:
      private

        def max_value
          super * 2
        end

        def min_value
          0
        end
    end
  end
end