Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding in some comments to the latest changes

  • Loading branch information...
commit f30c97c794ba74e737856aa9226328469c8395b6 1 parent 78dae86
Brendan G. Lim authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/mobile_fu.rb
View
3  lib/mobile_fu.rb
@@ -90,6 +90,9 @@ def is_mobile_device?
request.user_agent.to_s.downcase =~ Regexp.new(ActionController::MobileFu::MOBILE_USER_AGENTS)
end
+ # Can check for a specific user agent
+ # e.g., is_device?('iphone') or is_device?('mobileexplorer')
+
def is_device?(type)
request.user_agent.to_s.downcase.include?(type.to_s.downcase)
end
Please sign in to comment.
Something went wrong with that request. Please try again.