Topic: Sinatra multiple GET parameters problem

Hi guys,

I'm programming a Sinatra Web app based in Max de Marzi Neovigator App (for Neo4j), now I'm trying to use the application plus two text boxes, one with the start date and end date to another. Just need these values to filter the results returned by cypher query, ie, return only relationships where datestamp property is between the start date and end date in the past two text boxes.


    %form{:action => "/", :method => "get"}
      %label ID:
      %input#neoid{:type => "text", :value => "#{@neoid}", :name => "neoid"}
      %label Start:
      %input#start{:type => "text", :value => "#{@start}", :name => "start"}
      %label End:
      %input#end{:type => "text", :value => "#{@end}", :name => "end"}
      %input#loadnode{:type => "submit", :value => "Search", :class => "button"}


get '/resources/show'
    cypher = "START n = node (#{params[:id]})
              MATCH n - [r?] - N1
              WHERE r.datestamp> = #{params[:start]} AND r.datestamp <= #{params[:end]}
              RETURN n, r, n1 "

The HTTP debug output: - - [26/Jun/2013 01:38:39] "GET /?neoid=2&start=20130622&end=20130625 HTTP/1.1" 200 4228 0.0868 - - [26/Jun/2013 01:38:41] "GET /resources/show?id=2%26start HTTP/1.1" 400 - 1.6111

The graph with nodes and relationships is not drawn.

What am I doing wrong? How can I achieve the desired shape faster and simpler?

Thanks in advance