joshbuddy / http_router

A kick-ass HTTP router for use in Rack
MIT License
198 stars 44 forks source link

router not available in env #30

Open jackc opened 12 years ago

jackc commented 12 years ago

According to the comments/rdoc (http://rubydoc.info/github/joshbuddy/http_router/master/HttpRouter#call-instance_method), http_router should be placing a reference to itself in the env. This does not appear to be there.

http_router.rb:156

  # Rack compatible #call. If matching route is found, and +dest+ value responds to #call, processing will pass to the matched route. Otherwise,
  # the default application will be called. The router will be available in the env under the key <tt>router</tt>. And parameters matched will
  # be available under the key <tt>router.params</tt>.
  def call(env, &callback)
    compile
    call(env, &callback)
  end