From 608dc632374f0af84478c907800f2ba0b0ac9e05 Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Thu, 6 Dec 2012 13:27:52 -0800 Subject: [PATCH 1/2] Actually set the neo_server on Relationships --- lib/neography/relationship.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neography/relationship.rb b/lib/neography/relationship.rb index df4d9b6..299bd11 100644 --- a/lib/neography/relationship.rb +++ b/lib/neography/relationship.rb @@ -34,7 +34,7 @@ def initialize(hash=nil, server=nil) @start_node = hash["start"].split('/').last @end_node = hash["end"].split('/').last @rel_type = hash["type"] - neo_server = server + self.neo_server = server end def neo_server From 091ac991bc020ebfb053a52aa3eaf64e8ebb35a0 Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Thu, 6 Dec 2012 13:43:12 -0800 Subject: [PATCH 2/2] Pass the db to the new Relationship in Relationship.load --- lib/neography/relationship.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neography/relationship.rb b/lib/neography/relationship.rb index 299bd11..383fac4 100644 --- a/lib/neography/relationship.rb +++ b/lib/neography/relationship.rb @@ -21,7 +21,7 @@ def load(rel, db = Neography::Rest.new) rel = db.get_relationship(rel) if rel - rel = Neography::Relationship.new(rel) + rel = Neography::Relationship.new(rel, db) rel.start_node = Neography::Node.load(rel.start_node, db) rel.end_node = Neography::Node.load(rel.end_node, db) end