Skip to content

Commit

Permalink
Adding in some comments to the latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan G. Lim committed Sep 8, 2008
1 parent 78dae86 commit f30c97c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/mobile_fu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f30c97c

Please sign in to comment.