cscotta (owner)
This gist is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are given this private URL.
Every gist with this icon (
) is private.
Every gist with this icon (
This gist is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Redirecting smart and dumb mobile browsers in Interface ERB templates
-—————————————————————————————————
In the page you’d like to redirect (or _header.html.erb) -
<%= mobile_redirect(‘http://www.google.com’, ‘http://www.microsoft.com’) %>
The first argument is the address for smart mobile devices defined in the smart_list array (see mobile_redirect method).
The second argument is the address for dumb mobile devices.
If you’d prefer not to redirect a smart or dumb mobile device, pass an empty string:
<%= mobile_redirect(‘http://www.google.com’, ’’) %>
Include this in client_helper.rb:
def mobile_redirect(smart_url, mobile_url)
agent = request.user_agent.downcase





