I want to pass a parameter (for example the param is called company=heise) on a link to, but only if the param really is present.
Lets say:
I visit somesite.com
and click a link that would redirect me to mysite.com/?company=heise
On mysite
i have a few link_to's and I want them to pass the parameter company=heise
when it's present and since it is present now because I entered the site via mysite.com/?company=heise
it should do the following:
<%= link_to "This is a link", this_link_path, class: tl(this_link_path) %>
should redirect me to mysite.com/this_link/?company=heise
- If company=heise is set I want to display them in the URL and I furthermore want to not display it when it's not set.
Hope I made my question clear enough