Files
postal/app/models/concerns/has_uuid.rb
T

16 lines
199 B
Ruby

# frozen_string_literal: true
module HasUUID
def self.included(base)
base.class_eval do
random_string :uuid, type: :uuid, unique: true
end
end
def to_param
uuid
end
end