rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Neil <neil.matatall@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Rack request['param']= not being honored?
Date: Mon, 8 Aug 2011 15:22:25 -0700 (PDT)	[thread overview]
Message-ID: <254d82ea-9638-476a-b89a-158976e8e2fa@f39g2000prb.googlegroups.com> (raw)

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 127.0.0.1 at 2011-08-08 15:12:03
-0700
  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

                 reply	other threads:[~2011-08-08 22:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=254d82ea-9638-476a-b89a-158976e8e2fa@f39g2000prb.googlegroups.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).