Skip to content

Instantly share code, notes, and snippets.

@bigfolio
Created April 4, 2010 01:16
# Request from an iPhone or iPod touch? (Mobile Safari user agent)
def iphone_user_agent?
request.env["HTTP_USER_AGENT"] && request.env["HTTP_USER_AGENT"][/(Mobile\/.+Safari)/]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment