Ticket #190 (friendlier way to add / register a mime type)
Stephen Caudill
scaudill at gmail.com
Wed Sep 19 16:08:51 EDT 2007
Following up on #190 [1], I've just added a simple patch that allows
the manipulation of the TYPES hash from within the Merb module. Use
like:
Merb.add_mime_type(:png,%w[image/png])
Merb.remove_mime_type(:png)
It specifically disallows the removal of the :all MimeType, since
content negotiation relies on it.
I'm not super wonderful at API design, so comments and suggestions,
are of course welcome. If everyone likes it as-is, just shout and
I'll commit it.
--
Stephen
[1] http://merb.devjavu.com/projects/merb/ticket/190
More information about the Merb-devel
mailing list