Skip to content

Commit

Permalink
fixes automatically quoting value in find_node_labels search
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Guidarelli committed Dec 19, 2013
1 parent 3b6f990 commit 30a94ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/neography/rest/node_labels.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion lib/neography/rest/paths.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 30a94ff

Please sign in to comment.