blob: 143c144c502ff37be49ecdfc1b287c6315ddced5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
module CertificateAuthority
class SerialNumber
include ActiveModel::Validations
include Revocable
attr_accessor :number
validates :number, :presence => true, :numericality => {:greater_than => 0}
def initialize
self.number = SecureRandom.random_number(2**128-1)
end
end
end
|