def retrieve_response_from_mimes(mimes, &block)
      responder = ActionController::MimeResponds::Responder.new(self)
      mimes = collect_mimes_from_class_level if mimes.empty?
      mimes.each { |mime| responder.send(mime) }
      block.call(responder) if block_given?

      if format = responder.negotiate_mime
        self.response.template.template_format = format.to_sym
        self.response.content_type = format.to_s
        self.formats = [ format.to_sym ]
        responder.response_for(format) || proc { default_render }
      else
        head :not_acceptable
        nil
      end
    end
def retrieve_response_from_mimes(mimes, &block)
      responder = ActionController::MimeResponds::Responder.new(self)
      mimes = collect_mimes_from_class_level if mimes.empty?
      mimes.each { |mime| responder.send(mime) }
      block.call(responder) if block_given?

      if format = responder.negotiate_mime
        self.response.template.template_format = format.to_sym
        self.response.content_type = format.to_s
        self.formats = [ format.to_sym ]
        responder.response_for(format) || proc { default_render }
      else
        head :not_acceptable
        nil
      end
    end
Collects mimes and return the response for the negotiated format. Returns
 nil if :not_acceptable was sent to the client.