Module: Neo4j::ActiveRel::Callbacks

Extended by:
ActiveSupport::Concern
Includes:
Shared::Callbacks
Included in:
Neo4j::ActiveRel
Defined in:
lib/neo4j/active_rel/callbacks.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from Shared::Callbacks

#conditional_callback, #destroy, #initialize, #touch

Instance Method Details

#save(*args) ⇒ Object



7
8
9
10
11
12
# File 'lib/neo4j/active_rel/callbacks.rb', line 7

def save(*args)
  unless _persisted_obj || (from_node.respond_to?(:neo_id) && to_node.respond_to?(:neo_id))
    fail Neo4j::ActiveRel::Persistence::RelInvalidError, 'from_node and to_node must be node objects'
  end
  super(*args)
end