public
Description: A plugin to serve up pages as 'application/xhtml+xml' in development mode
Homepage:
Clone URL: git://github.com/vigetlabs/xhtml-dev.git
name age message
file MIT-LICENSE Fri Jul 25 12:50:58 -0700 2008 initial commit [bscofield]
file README Fri Jul 25 12:54:57 -0700 2008 added contenful README [bscofield]
file Rakefile Fri Jul 25 12:50:58 -0700 2008 initial commit [bscofield]
file init.rb Fri Jul 25 12:50:58 -0700 2008 initial commit [bscofield]
directory lib/ Tue Dec 23 07:39:20 -0800 2008 send text/html for all IEs - 7 chokes on xhtml+... [bscofield]
directory test/ Fri Jul 25 12:50:58 -0700 2008 initial commit [bscofield]
README
XhtmlDev
========

This plugin makes design and development a little better by tweaking the content type of pages
generated by Rails. In development mode, it'll automatically serve up HTML pages with the content-
type 'application/xhtml+xml' — which means that standards-aware browsers will show an exception page
if you enter invalid XHTML markup.

Of course, IE6 and friends can't handle that MIME type, so the plugin makes sure that they get the 
pages as 'text/html.' Also, to more easily deal with user-generated content in the wild, anything
coming out of the production environment will also be served as 'text/html.'

Example
=======

The only thing you have to do to get this running is add a before filter to your application 
controller:

class ApplicationController < ActionController::Base
  before_filter :handle_with_ie
end

And even that's optional, if you don't care to serve 'text/html' to IE6, et al. in development mode.

Happy hacking!


Copyright (c) 2008 Ben Scofield of Viget Labs, released under the MIT license