Style I18n call

This commit is contained in:
Maikel Linke
2018-09-27 11:34:09 +10:00
parent af1ac333df
commit f0021be53c

View File

@@ -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