From: Justin Collins Date: 2012-05-22T03:50:41+09:00 Subject: Re: Sinatra learning problem [$_GET] On 05/21/2012 10:23 AM, cristian d. wrote: > Hi ! > > > Im learning Sinatra, while i was doing that.... i realize that i didnt > understand nothing about passing variables via URL [GET] > > i understand that i can: > > get '/:something' do > "Print #{params[:something]}!" > end For any url that looks like "/blah" the variable "params[:something]" will be set to whatever comes after the "/" For example (using curl): $ curl localhost:5000/blah Print blah! $ curl localhost:5000/whatever Print whatever! $ curl localhost:5000/something Print something! $ curl localhost:5000/whee Print whee! The ":something" in your route just determines the name of the parameter. See http://www.sinatrarb.com/intro#Routes -Justin