diff --git a/lib/neography/rest/node_labels.rb b/lib/neography/rest/node_labels.rb index 27968eb..85ab331 100644 --- a/lib/neography/rest/node_labels.rb +++ b/lib/neography/rest/node_labels.rb @@ -7,7 +7,7 @@ class NodeLabels add_path :base, "/labels" add_path :node, "/node/:id/labels" add_path :nodes, "/label/:label/nodes" - add_path :find, "/label/:label/nodes?:property=%22:value%22" + add_path :find, "/label/:label/nodes?:property=:value" add_path :delete, "/node/:id/labels/:label" def initialize(connection) diff --git a/lib/neography/rest/paths.rb b/lib/neography/rest/paths.rb index b322542..622f6e0 100644 --- a/lib/neography/rest/paths.rb +++ b/lib/neography/rest/paths.rb @@ -23,7 +23,11 @@ def add_path(key, path) def build_path(path, attributes) path.gsub(/:([\w_]*)/) do - encode(attributes[$1.to_sym].to_s) + if $1.to_sym == :value and attributes[$1.to_sym].class == String + encode("%22"+attributes[$1.to_sym].to_s+"%22") + else + encode(attributes[$1.to_sym].to_s) + end end end