<%= link_to "Mobile", :action => "action_name",
:view_format => "mobile" %>
# if action_name is name of your current action
Thanks,
Abhinav
--
अभिनव
http://twitter.com/abhinav
On Wed, Sep 9, 2009 at 3:43 AM, Gleb Mazovetskiy <
rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:
>
> 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
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---