http_router icon indicating copy to clipboard operation
http_router copied to clipboard

router not available in env

Open jackc opened this issue 13 years ago • 0 comments

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

jackc avatar Aug 09 '12 16:08 jackc