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?



<%= link_to “Mobile”, :action => “action_name”, :view_format => “mobile”

if action_name is name of your current action



On Wed, Sep 9, 2009 at 3:43 AM, Gleb M. <

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs