class ActionController::Responder

def initialize(controller, resources, options = {})

def initialize(controller, resources, options = {})
  @controller = controller
  @request = @controller.request
  @format = @controller.formats.first
  @resource = resources.last
  @resources = resources
  @options = options
  @action = options.delete(:action)
  @default_response = options.delete(:default_response)
  if options[:location].respond_to?(:call)
    location = options.delete(:location)
    options[:location] = location.call unless has_errors?
  end
end