OK, A while back (pre 1.2, if I remember correctly), putting a slash in front of a controller name then using link_to would cause any recalled parameters to be ignored, e.g. On a page with a url of / articles/edit/1?test=1, the following code would produce a link to / articles/edit/1: link_to "Edit", :controller=>"/articles", :action=>"edit" This appears to be broken after 1.2, and the following bug report has been closed with "invalid": http://dev.rubyonrails.org/ticket/7792 Does anyone know if this is the new intended functionality, and if so, is there another way of producing the depreciated effect? Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Maybe url_for''s :overwrite_params option will be what you are looking for. link_to will accept the same options and parameters. http://api.rubyonrails.org/classes/ActionController/Base.html#M000262 HTH, Kevin Skoglund http://www.nullislove.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the reply, Kevin - unfortunately, it''s not what I need, and the docs do seem to verify that the bug is valid (thanks for the link). To quote the docs: There are a few simple rules on how this is performed: * If the controller name begins with a slash, no defaults are used: url_for :controller => ''/home'' * If the controller changes, the action will default to index unless provided It seems that the bug report needs to be reopened. Ah well. Matt On Jun 8, 2:36 pm, Kevin Skoglund <k...-WGmuFPN42W8gMxX8nMqP6gC/G2K4zDHf@public.gmane.org> wrote:> Maybe url_for''s :overwrite_params option will be what you are looking > for. link_to will accept the same options and parameters. > > http://api.rubyonrails.org/classes/ActionController/Base.html#M000262 > > HTH, > Kevin Skoglundhttp://www.nullislove.com--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---