update verbiage to be more concise
This commit is contained in:
parent
f89f71262d
commit
567d59e48a
|
@ -12,7 +12,7 @@ en:
|
|||
|
||||
devise:
|
||||
failure:
|
||||
no_authentication_allowed: 'You are attempting to access a resource as an authenticated user when that is not allowed. Please sign out and try again.'
|
||||
already_authenticated: 'You are already signed in.'
|
||||
unauthenticated: 'You need to sign in or sign up before continuing.'
|
||||
unconfirmed: 'You have to confirm your account before continuing.'
|
||||
locked: 'Your account is locked.'
|
||||
|
|
|
@ -114,7 +114,7 @@ MESSAGE
|
|||
def require_no_authentication
|
||||
if warden.authenticated?(resource_name)
|
||||
resource = warden.user(resource_name)
|
||||
flash[:alert] = I18n.t("devise.failure.no_authentication_allowed")
|
||||
flash[:alert] = I18n.t("devise.failure.already_authenticated")
|
||||
redirect_to after_sign_in_path_for(resource)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -50,7 +50,7 @@ class HelpersTest < ActionController::TestCase
|
|||
@mock_warden.expects(:user).with(:user).returns(User.new)
|
||||
@controller.expects(:redirect_to).with(root_path)
|
||||
@controller.send :require_no_authentication
|
||||
assert flash[:alert] == I18n.t("devise.failure.no_authentication_allowed")
|
||||
assert flash[:alert] == I18n.t("devise.failure.already_authenticated")
|
||||
end
|
||||
|
||||
test 'signed in resource returns signed in resource for current scope' do
|
||||
|
|
Loading…
Reference in New Issue