Ticket #190 (friendlier way to add / register a mime type)
Stephen Caudill
scaudill at gmail.com
Fri Sep 21 10:43:16 EDT 2007
Just wanted to bump this for comment.
On Sep 19, 2007, at 4:08 PM, Stephen Caudill wrote:
> 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