Sha256: fb4c7d164650d1d481a9a4dc0f832f1fc718af31c1c3a1fbca59c89ecb897f02

Contents?: true

Size: 536 Bytes

Versions: 42

Compression:

Stored size: 536 Bytes

Contents

module CassandraObject
  module Callbacks
    extend ActiveSupport::Concern

    included do
      extend ActiveModel::Callbacks
      define_model_callbacks :save, :create, :destroy, :update
    end

    def destroy #:nodoc:
      _run_destroy_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

42 entries across 42 versions & 2 rubygems

Version Path
sessionm-cassandra_object-2.2.26 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.24 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.23 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.22 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.20 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.18 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.16 lib/cassandra_object/callbacks.rb
gotime-cassandra_object-2.3.4 lib/cassandra_object/callbacks.rb
gotime-cassandra_object-2.3.3 lib/cassandra_object/callbacks.rb
gotime-cassandra_object-2.3.2 lib/cassandra_object/callbacks.rb
gotime-cassandra_object-2.3.1 lib/cassandra_object/callbacks.rb
gotime-cassandra_object-2.3.0 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.14 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.12 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.10 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.8 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.6 lib/cassandra_object/callbacks.rb
gotime-cassandra_object-2.2.4 lib/cassandra_object/callbacks.rb
gotime-cassandra_object-2.2.3 lib/cassandra_object/callbacks.rb
gotime-cassandra_object-2.2.2 lib/cassandra_object/callbacks.rb