Skip to content

Instantly share code, notes, and snippets.

@rgarner
Created July 27, 2011 09:00
Show Gist options
  • Save rgarner/1108964 to your computer and use it in GitHub Desktop.
Save rgarner/1108964 to your computer and use it in GitHub Desktop.
Aliasing HTML to XHTML by default
module Mime
remove_const('HTML')
XHTML = Mime::Type.new "application/xhtml+xml", :xhtml
Mime::Type.register_alias "application/xhtml+xml", :html
LOOKUP['text/html'] = LOOKUP[:html] = XHTML
LOOKUP['application/xhtml+xml'] = LOOKUP[:xhtml] = XHTML
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment