Skip to content

Instantly share code, notes, and snippets.

@rkh
Created July 8, 2011 17:30
Show Gist options
  • Save rkh/1072326 to your computer and use it in GitHub Desktop.
Save rkh/1072326 to your computer and use it in GitHub Desktop.
require 'sinatra'
# see http://www.sinatrarb.com/intro#Conditions
set(:action) { |value| condition { params[:Action] == value.to_s } }
get '/', :action => :xyz do
# ...
end
require 'sinatra'
get '/' do
pass if params[:Action] == 'xyz'
# ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment