rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: "Sylvain Desvé" <sylvain.desve@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: Rack: adding a query parameter before call
Date: Sun, 24 Apr 2011 21:45:16 +0200	[thread overview]
Message-ID: <BANLkTi=mb=Z6ncvBHv2HZp+dz=MYgKez_A@mail.gmail.com> (raw)
In-Reply-To: <BANLkTik_jqfxKqcygQuXkLGKEeVyxkrD4g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

I think you meant "Rack" and not "Rake". If so, here is a method to add a
parameter to the query string :

use Rack::Config do |env|
  env["QUERY_STRING"] += "&" unless env["QUERY_STRING"].empty?
  env["QUERY_STRING"] += "" + Rack::Utils.build_query(:my_new_parameter =>
"and its value")
end

2011/4/24 Lee Hambley <lee.hambley@gmail.com>

> Example please Ned… (the code you have so far)
>

[-- Attachment #2: Type: text/html, Size: 838 bytes --]

      reply	other threads:[~2011-04-24 19:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-24 14:34 Rack: adding a query parameter before call Ned
2011-04-24 17:58 ` Lee Hambley
2011-04-24 19:45   ` Sylvain Desvé [this message]

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='BANLkTi=mb=Z6ncvBHv2HZp+dz=MYgKez_A@mail.gmail.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).