From f0021be53c18cfc1193942e2750c4c095beb2313 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 27 Sep 2018 11:34:09 +1000 Subject: [PATCH] Style I18n call --- app/controllers/user_registrations_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/user_registrations_controller.rb b/app/controllers/user_registrations_controller.rb index 654fe1791ef..cc43badbb81 100644 --- a/app/controllers/user_registrations_controller.rb +++ b/app/controllers/user_registrations_controller.rb @@ -1,6 +1,8 @@ require 'open_food_network/error_logger' class UserRegistrationsController < Spree::UserRegistrationsController + I18N_SCOPE = 'devise.user_registrations.spree_user'.freeze + before_filter :set_checkout_redirect, only: :create # POST /resource/sign_up @@ -25,7 +27,7 @@ def create end rescue StandardError => error OpenFoodNetwork::ErrorLogger.notify(error) - render_error(message: I18n.t('devise.user_registrations.spree_user.unknown_error')) + render_error(message: I18n.t('unknown_error', scope: I18N_SCOPE)) end private