lib/neo4j/active_rel/callbacks.rb in neo4j-5.0.0.rc.2 vs lib/neo4j/active_rel/callbacks.rb in neo4j-5.0.0.rc.3
- old
+ new
@@ -3,10 +3,10 @@
module Callbacks #:nodoc:
extend ActiveSupport::Concern
include Neo4j::Shared::Callbacks
def save(*args)
- unless self.persisted? || (from_node.respond_to?(:neo_id) && to_node.respond_to?(:neo_id))
+ 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
end