Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed detection from subdomain to autodetect

  • Loading branch information...
commit ea56de7ae3a2fab747df16942f86e28880e8ce39 1 parent 5de6766
@jfriedlaender authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/controllers/application_controller.rb
View
2  app/controllers/application_controller.rb
@@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
before_filter :prepare_for_touch_screen
def mobile_device?
- request.subdomains.first && request.subdomains.first.downcase == "m"
+ request.user_agent =~ /Mobile|webOS/
end
helper_method :mobile_device?
Please sign in to comment.
Something went wrong with that request. Please try again.