Changed to support rails-api's ActionController::API controller