Sha256: ff3906074cc97139bff0125f98c57fe647d350a2b9300637d345b88a820a41e4

Contents?: true

Size: 428 Bytes

Versions: 8

Compression:

Stored size: 428 Bytes

Contents

module Neo4j
  module ActiveRel
    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))
          fail Neo4j::ActiveRel::Persistence::RelInvalidError, 'from_node and to_node must be node objects'
        end
        super(*args)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
neo4j-5.0.0.rc.2 lib/neo4j/active_rel/callbacks.rb
neo4j-5.0.0.rc.1 lib/neo4j/active_rel/callbacks.rb
neo4j-4.1.5 lib/neo4j/active_rel/callbacks.rb
neo4j-4.1.4 lib/neo4j/active_rel/callbacks.rb
neo4j-4.1.3 lib/neo4j/active_rel/callbacks.rb
neo4j-4.1.2 lib/neo4j/active_rel/callbacks.rb
neo4j-4.1.1 lib/neo4j/active_rel/callbacks.rb
neo4j-4.1.0 lib/neo4j/active_rel/callbacks.rb