Skip to content

Instantly share code, notes, and snippets.

@lukesutton
Created November 17, 2008 23:35
Show Gist options
  • Select an option

  • Save lukesutton/25965 to your computer and use it in GitHub Desktop.

Select an option

Save lukesutton/25965 to your computer and use it in GitHub Desktop.
match("/path/to/match").defer_to do |request, params|
if something? params[:thing]
request.env["REQUEST_PATH"] = "/a/different/path"
new_params = Merb::Router.match(request)[1]
new_params.merge(:custom_parameter => "Weeee!")
else
param
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment