Sha256: 9d7431348d0d439997e84647ea0271182cd44d6f6fcf4dba547d9b0518b61185
Contents?: true
Size: 464 Bytes
Versions: 33
Compression:
Stored size: 464 Bytes
Contents
require 'securerandom' module Superstore module Identity extend ActiveSupport::Concern included do class_attribute :key_generator key do SecureRandom.uuid.tr('-','') end end module ClassMethods # Define a key generator. Default is UUID. def key(&block) self.key_generator = block end def _generate_key(object) object.instance_eval(&key_generator) end end end end
Version data entries
33 entries across 33 versions & 1 rubygems