Skip to content

Commit

Permalink
update verbiage to be more concise
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdempsey authored and josevalim committed Apr 16, 2011
1 parent f89f712 commit 567d59e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down
2 changes: 1 addition & 1 deletion lib/devise/controllers/internal_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def build_resource(hash=nil)
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
Expand Down
2 changes: 1 addition & 1 deletion test/controllers/internal_helpers_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def setup
@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
Expand Down

0 comments on commit 567d59e

Please sign in to comment.