Sha256: 005cd219fd0583ea49f8e6fd19deeb82497c6ea7eac00d20e2f02fd553431c9c

Contents?: true

Size: 512 Bytes

Versions: 7

Compression:

Stored size: 512 Bytes

Contents

# encoding: UTF-8
module MongoMapper
  module Plugins
    module Callbacks
      extend ActiveSupport::Concern

      def destroy
        run_callbacks(:destroy) { super }
      end
      
      def touch(*)
        run_callbacks(:touch) { super }
      end

    private
      def create_or_update(*)
        run_callbacks(:save) { super }
      end

      def create(*)
        run_callbacks(:create) { super }
      end

      def update(*)
        run_callbacks(:update) { super }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
mongo_mapper-0.13.0.beta2 lib/mongo_mapper/plugins/callbacks.rb
mongo_mapper-0.13.0.beta1 lib/mongo_mapper/plugins/callbacks.rb
mongo_mapper-0.12.0 lib/mongo_mapper/plugins/callbacks.rb
lookout-mongo_mapper-0.11.3 lib/mongo_mapper/plugins/callbacks.rb
mongo_mapper-0.11.2 lib/mongo_mapper/plugins/callbacks.rb
jamieorc-mongo_mapper-0.11.1.1 lib/mongo_mapper/plugins/callbacks.rb
mongo_mapper-0.11.1 lib/mongo_mapper/plugins/callbacks.rb