Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
# set the charset def set_content_type # Always return text/html for the engines. if self.controller_name == 'role' || self.controller_name == 'user' @headers["Content-Type" ] = "text/html;charset=utf-8;" return true else # If the current controller isn't an engine, see if we can serve it proper XHTML/XML: if (@request.env['HTTP_ACCEPT'].match(/application\/xhtml\+xml/)) @headers["Content-Type" ] = "application/xhtml+xml;charset=utf-8;"; else @headers["Content-Type" ] = "text/html;charset=utf-8;" end end return true end
This paste will be private.
From the Design Piracy series on my blog: