Forum: Ruby on Rails Add parameter to url

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ead43bcb0202410540a6a7cee5955d46?d=identicon&s=25 Fresh Mix (giga)
on 2009-03-20 17:53
If url is http://mydomain.com/blog/tags

How can I make a link, that add parameter to url?

Ex: http://mydomain.com/blog/tags?locale=de

And not a: http://mydomain.com/?locale=de


<%= link_to "My link", :locale => 'de' %> Remove "blog/tags" from url.
4c438a80fc30661ad619ea177cf9cbd0?d=identicon&s=25 Freddy Andersen (Guest)
on 2009-03-20 18:24
(Received via mailing list)
<%= link_to "Link", blog_path(:locale => "de") %>

or

<%= link_to "Link", :controller => "blog", :action => "show", :locale
=> "de" %>
This topic is locked and can not be replied to.