Any specific outgoing headers should be included here. These are not the content-type header but anything in addition to it. tranform_method should be set to a symbol of the method used to transform a resource into this mime type. For example for the :xml mime type an object might be transformed by calling :to_xml, or for the :js mime type, :to_json. If there is no transform method, use nil.
Source Code
# File merb/mixins/responder.rb, line 17 def add_mime_type(key,transform_method, values,new_response_headers = {}) raise ArgumentError unless key.is_a?(Symbol) && values.is_a?(Array) ResponderMixin::Rest::TYPES.update(key => values) add_response_headers!(key, new_response_headers) ResponderMixin::Rest::TRANSFORM_METHODS.merge!(key => transform_method) end
<code/>and<pre/>for code samples.