From: Justin Collins Date: 2012-05-22T06:08:06+09:00 Subject: Re: Sinatra learning problem [$_GET] On 05/21/2012 12:07 PM, cristian d. wrote: > let me see if i understand, so for example i have two scripts like: > > one.rb > two.rb > > if i want to sent a VAR to tho.rb i will just > > redirect to two.rb/something=1 > > like that ? > > Thanks Justin !!! > > pd: and for POST like in a
? If all you want is to access the query parameters (the key-value pairs after "?" in a URL), then you do not need to have ":something" in your route. If you have something like this: get '/' do "Print #{params[:something]}!\n" end You can access it like (note the "?"): $ curl localhost:5000/?something=hi Print hi! POST and GET parameters are both stored in the "params" hash. -Justin