From 631b16ef865b8694908c63900470cae5734f1c7c Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Wed, 22 May 2019 17:39:08 +0300 Subject: [PATCH] FIX: Fix build. Follow-up to 25453eb. --- lib/json_error.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/json_error.rb b/lib/json_error.rb index 9518eceeda4..ac6ff76edc5 100644 --- a/lib/json_error.rb +++ b/lib/json_error.rb @@ -32,7 +32,7 @@ module JsonError return { errors: [message] } if message.present? end - return { errors: [I18n.t('not_found')] } if obj.not_found + return { errors: [I18n.t('not_found')] } if obj.is_a?(HasErrors) && obj.not_found # Log a warning (unless obj is nil) Rails.logger.warn("create_errors_json called with unrecognized type: #{obj.inspect}") if obj