... | ... |
@@ -7,8 +7,7 @@ class ApplicationController < ActionController::Base |
7 | 7 |
create_new_authentification() |
8 | 8 |
else |
9 | 9 |
unless controller_name == 'sessions' && (action_name == 'new' || action_name == 'create') |
10 |
- flash.now[:error] = I18n.t 'login.access-denied' |
|
11 |
- render "sessions/new" |
|
10 |
+ redirect_to root_url, flash: {error: I18n.t('login.access-denied')} |
|
12 | 11 |
end |
13 | 12 |
end |
14 | 13 |
end |