From 5eb807a653fe05b2d2a278160909622315fcbd31 Mon Sep 17 00:00:00 2001 From: Ujjwal Thaakar Date: Tue, 22 Oct 2013 12:41:23 +0530 Subject: [PATCH] Check for subclasses of Neography::Node and not just an instance. --- lib/neography/index.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neography/index.rb b/lib/neography/index.rb index 8817987..337d7d4 100644 --- a/lib/neography/index.rb +++ b/lib/neography/index.rb @@ -25,7 +25,7 @@ module ClassMethods def find(*args) db = args[3] ? args.pop : Neography::Rest.new - if self.is_a?(Neography::Node) + if self <= Neography::Node nodes = [] results = db.find_node_index(*args) return nil unless results