From 1b27ed2f2291c1342b41fbf4e3f5b406567af4f0 Mon Sep 17 00:00:00 2001 From: spengreb Date: Tue, 8 Oct 2019 19:57:48 +0200 Subject: [PATCH] Fix voucher not valid error message type --- app/controllers/vouchers_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/vouchers_controller.rb b/app/controllers/vouchers_controller.rb index 28df62b..55735e4 100644 --- a/app/controllers/vouchers_controller.rb +++ b/app/controllers/vouchers_controller.rb @@ -31,7 +31,7 @@ class VouchersController < ApplicationController end else - render json: "{ Voucher is not valid }" + params[:voucher].in?(whitelist), status: :unprocessable_entity + render json: "{ Voucher is not valid }" + str(params[:voucher].in?(whitelist)), status: :unprocessable_entity end