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.
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.
<%= link_to “Link”, blog_path(:locale => “de”) %>
or
<%= link_to “Link”, :controller => “blog”, :action => “show”, :locale
=> “de” %>
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs