Sha256: 8efa3afdc92adc17d8057a1c70d688429bc02ea071db21191d25a415da975a35

Contents?: true

Size: 792 Bytes

Versions: 13

Compression:

Stored size: 792 Bytes

Contents

module Neo4j
	module Rails
		module Callbacks
			extend ActiveSupport::Concern
			
			included do
				[:create_or_update, :create, :update, :destroy].each do |method|
					alias_method_chain method, :callbacks
				end
				
				extend ActiveModel::Callbacks
				
				define_model_callbacks :create, :save, :update, :destroy
			end
			
			def destroy_with_callbacks #:nodoc:
				_run_destroy_callbacks { destroy_without_callbacks }
			end
			
			private
			def create_or_update_with_callbacks #:nodoc:
				_run_save_callbacks { create_or_update_without_callbacks }
			end
	
			def create_with_callbacks #:nodoc:
				_run_create_callbacks { create_without_callbacks }
			end
	
			def update_with_callbacks(*) #:nodoc:
				_run_update_callbacks { update_without_callbacks }
			end
		end
	end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
neo4j-1.0.0-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.32-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.31-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.30-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.29-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.28-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.27-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.26-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.25-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.24-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.23-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.22-java lib/neo4j/rails/callbacks.rb
neo4j-1.0.0.beta.21-java lib/neo4j/rails/callbacks.rb