Skip to content

Commit

Permalink
Style I18n call
Browse files Browse the repository at this point in the history
  • Loading branch information
mkllnk committed Sep 27, 2018
1 parent af1ac33 commit f0021be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/user_registrations_controller.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit f0021be

Please sign in to comment.