Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

with(options, &block) #2

Open
botanicus opened this Issue Dec 1, 2009 · 2 comments

Comments

Projects
None yet
3 participants
Collaborator

botanicus commented Dec 1, 2009

The idea comes from merb. How it works:

`with(page: 1) do

everything in here will get {page: 1} into conditions

get("/products").to(app)
get("/tags").to(app)
end`

Instead of:

get("/products").to(app, page: 1) get("/tags").to(app, page: 1)

Also there has to be a way how to put an app and options to Usher::Route#to method. See http://github.com/joshbuddy/usher/issues/#issue/3 for more informations.

Owner

joshbuddy commented Dec 4, 2009

I think this is already covered with default_values ... I will doc this, but lemme know if that works for you.

DAddYE commented Apr 27, 2010

Default values I confirm works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment