Sha256: c58feb1dad110602d87478c88c1ad21ff74b8663675cb81f36cbed65e57ddcd6
Contents?: true
Size: 610 Bytes
Versions: 5
Compression:
Stored size: 610 Bytes
Contents
class Cassie::Thing include Cassie::Model self.table_name = "things" self.keyspace = "test" self.primary_key = [:owner, :id] self.read_consistency = :one self.write_consistency = :quorum column :owner, :int column :id, :int, as: :identifier column :val, :varchar, as: :value ordering_key :id, :desc validates_presence_of :owner, :id before_save do callbacks << :save end before_create do callbacks << :create end before_update do callbacks << :update end before_destroy do callbacks << :destroy end def callbacks @callbacks ||= [] end end
Version data entries
5 entries across 5 versions & 1 rubygems