Sha256: 0e1a9737b249058e765185da414e29247c487c057fe2a7172e2517b49322efdc
Contents?: true
Size: 760 Bytes
Versions: 78
Compression:
Stored size: 760 Bytes
Contents
require 'active_support/core_ext/array/wrap' module CassandraObject module Callbacks extend ActiveSupport::Concern included do extend ActiveModel::Callbacks include ActiveModel::Validations::Callbacks define_model_callbacks :initialize, :find, :touch, :only => :after define_model_callbacks :save, :create, :update, :destroy end def destroy #:nodoc: _run_destroy_callbacks { super } end def touch(*) #:nodoc: _run_touch_callbacks { super } end private def create_or_update #:nodoc: _run_save_callbacks { super } end def create #:nodoc: _run_create_callbacks { super } end def update(*) #:nodoc: _run_update_callbacks { super } end end end
Version data entries
78 entries across 78 versions & 1 rubygems