Skip to content

Instantly share code, notes, and snippets.

@HamptonMakes
Created January 6, 2009 21:14
Show Gist options
  • Save HamptonMakes/43997 to your computer and use it in GitHub Desktop.
Save HamptonMakes/43997 to your computer and use it in GitHub Desktop.
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