Skip to content

Instantly share code, notes, and snippets.

@linojon
Created September 3, 2009 03:45
Show Gist options
  • Save linojon/180120 to your computer and use it in GitHub Desktop.
Save linojon/180120 to your computer and use it in GitHub Desktop.
before_filter :newer_browser_required
def newer_browser_required
# ref http://pastie.org/203799
# reject MSIE 5.0 and MSIE 6.0
browser_access_denied if request.user_agent =~ /msie\s+[5,6]\.\d+/i
end
def browser_access_denied
store_location
redirect_back_gracefully("I'm sorry. Your current browser version is not supported for this operation. Please re-try using MSIE 7+, Firefox, or Safari browsers.")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment