I have page having url
http://localhost:3000/athletes/list
When user search on this page it changes to something like
http://localhost:3000/athletes/list?first_name=sachin&last_name=tendulkar
Where first_name
and last_name
are the search parameters when user search.
I want a link which add the parameter view_type=something in url for ex.
For 1st URL
http://localhost:3000/athletes/list?view_type=something
For 2nd URL
http://localhost:3000/athletes/list?first_name=sachin&last_name=tendulkar&view_type=something
I have tried following
<%= link_to "Something ", :view_type => 'something' %>
But for both url it gives following url
http://localhost:3000/athletes/list?view_type=something