rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* Rack request['param']= not being honored?
@ 2011-08-08 22:22 Neil
  0 siblings, 0 replies; only message in thread
From: Neil @ 2011-08-08 22:22 UTC (permalink / raw)
  To: Rack Development

Based on the docs and https://groups.google.com/group/rack-devel/browse_thread/thread/7a06ab0518ac54c1
this code should set a request parameter available to the controller.

          request['blog_post_id'] = 'test'
          Rails.logger.info("Routing website request
#{request.path_info} | #{request.params}")
          env = request.env
          return @app.call(env)

The logging statement produces:
Routing website request parent/1/nested/1 | {"blog_post_id"=>"test"},

So it is being set, and passed into @app.call, but when my Rails
action starts, the blog_post_id is curiously missing:

Started GET "/parent/1/nested/1" for at 2011-08-08 15:12:03
  Processing by Controller#show as HTML
  Parameters: {"parent"=>"1", "id"=>"1"}

The blog_post_id is missing from my params hash.  I think this was
working at some point, any idea why my param is disappearing?

Rails 3.1, rack 1.3.2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-08 22:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-08 22:22 Rack request['param']= not being honored? Neil

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).