Skip to content
Browse files

Adding in some comments to the latest changes

  • Loading branch information...
1 parent 78dae86 commit f30c97c794ba74e737856aa9226328469c8395b6 Brendan G. Lim committed Sep 8, 2008
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

0 comments on commit f30c97c

Please sign in to comment.
Something went wrong with that request. Please try again.