diff --git a/app/controllers/user_registrations_controller.rb b/app/controllers/user_registrations_controller.rb index 654fe1791e..cc43badbb8 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 @@ class UserRegistrationsController < Spree::UserRegistrationsController 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