The short answer is no.
Query string generation is deep down in the routing code...
http://dev.rubyonrails.org/browser/trunk/actionpack/lib/
action_controller/routing.rb#L443
Having said that, if you want, you can put in your
ApplicationControler in application.rb the following method...
def url_for ( options = {}, *params)
flag = options.key?(:flag) ? options.delete(:flag) : false
url = super(options, *params)
url << (flag ? "?flag" : "")
url
end
That overloads (...or monkeypatches, whatever!) the url_for
generation code for your application.
That is, provided that all parts of your app use @controller.send
(:url_for, options, *params) to generate their URLs, or use the Rails
helpers who should do that uniformly.
-christos
On 29 Nov 2006, at 14:22, Gareth Adams wrote:
>
> Hi guys,
> I want to write a url that directs to
>
> /my_controller/my_action?flag
>
> and not
>
> /my_controller/my_action?flag=1
>
> or
>
> /my_controller/my_action?flag>
> Is that possible with the Rails helpers?
>
> Gareth
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---