def response_for(*actions, &block)
      raise "Must specify one or more actions for response_for." if actions.empty?

      if block.arity < 1
        response_for(*actions) do |format|
          format.html(&block)
        end
      else
        response = Response.new
        block.call response

        actions.each do |action|
          @responses[action.to_sym] = response.formats
        end
      end
    end
def response_for(*actions, &block)
      raise "Must specify one or more actions for response_for." if actions.empty?

      if block.arity < 1
        response_for(*actions) do |format|
          format.html(&block)
        end
      else
        response = Response.new
        block.call response

        actions.each do |action|
          @responses[action.to_sym] = response.formats
        end
      end
    end
:call-seq:
   response_for(*actions) { ... }
   response_for(*actions) { |format| ... }

 Sets up a block of code to run
 instead of the default responses for one or more events.

 If the block takes a format parameter,
 it has the same semantics as Rails' +respond_to+ method.
 Various format methods are called on the format object
 with blocks that say what to do for each format.
 For example:

   response_for :index do |format|
     format.html
     format.atom do
       headers['Content-Type'] = 'application/atom+xml; charset=utf-8'
       render :action => 'atom', :layout => false
     end
   end

 This doesn't do anything special for the HTML
 other than ensure that the proper view will be rendered,
 but for ATOM it sets the proper content type
 and renders the atom template.

 If you only need to set the HTML response,
 you can omit the format parameter.
 For example:

   response_for :new do
     render :action => 'edit'
   end

 This is the same as

   response_for :new do |format|
     format.html { render :action => 'edit' }
   end

 The default responses are defined by
 Default::Responses.included[link:classes/Resourceful/Default/Responses.html#M000011].