Sha256: 96362fc4b5e2bb0404b41ffffa3c8bc82d81916b153940426a442df6d3872cf0
Contents?: true
Size: 445 Bytes
Versions: 28
Compression:
Stored size: 445 Bytes
Contents
module CassandraObject module Identity extend ActiveSupport::Concern included do class_attribute :key_generator key do SimpleUUID::UUID.new.to_guid 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
28 entries across 28 versions & 1 rubygems