Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

with(options, &block) #2

Open
botanicus opened this Issue · 2 comments

3 participants

@botanicus
Collaborator

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.

@joshbuddy
Owner

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

@DAddYE

Default values I confirm works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.