Skip to content

Instantly share code, notes, and snippets.

@dpmccabe
Created January 6, 2012 18:34
Show Gist options
  • Save dpmccabe/1571816 to your computer and use it in GitHub Desktop.
Save dpmccabe/1571816 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
before_filter :fix_accept_header
protected
def fix_accept_header
request.format = :html unless Mime::SET.map(&:symbol).include?(request.format.to_sym)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment