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.46 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.45 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.44 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.43 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.42 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.41 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.40 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.39 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.38 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.37 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.36 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.35 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.34 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.33 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.32 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.31 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.30 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.29 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.28 lib/cassandra_object/callbacks.rb
sessionm-cassandra_object-2.2.27 lib/cassandra_object/callbacks.rb