Skip to content

Instantly share code, notes, and snippets.

@hcatlin
Created Jan 6, 2009
Embed
What would you like to do?
def guess_content_type
ua = request.user_agent
if ua.include? "WebKit"
if ua.include?("iPhone") && !ua.include?("Safari")
:webkit_native
else
:webkit
end
else
:html
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment