link_to current page

I have a desktop version and a mobile version of my website.
They have different views, and the one to use is determined
automatically from the user agent string.

However, I want to let the user switch from/to mobile version manually
by providing a link to <current_page>?view_format=mobile

How can I do it? Can a link_to helper method do it? If yes, then how?

Thanks,

Gleb

<%= link_to “Mobile”, :action => “action_name”, :view_format => “mobile” %> # if action_name is name of your current action

Thanks,
Abhinav