From c6b9e01f32f5e58a4abf48b6c781906cd914429f Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Mon, 28 May 2012 10:28:02 +0100 Subject: Just include all the error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I can’t see any way the error could be triggered by the caller, anyway. --- app/controllers/api_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/controllers/api_controller.rb') diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index a5b70b8d2..a152813f0 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -46,12 +46,8 @@ class ApiController < ApplicationController request.outgoing_messages << outgoing_message # Return an error if the request is invalid + # (Can this ever happen?) if !request.valid? - # We don't want the error "Outgoing messages is invalid", as in this - # case the list of errors will also contain a more specific error - # describing the reason it is invalid. - info_request.errors.delete("outgoing_messages") - render :json => { 'errors' => request.errors.full_messages } -- cgit v1.2.3