File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
railties/lib/rails/generators/rails/authentication/templates/app/controllers Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ module Authentication
33
33
34
34
def request_authentication
35
35
session[:return_to_after_authenticating] = request.url
36
- redirect_to new_session_url
36
+ redirect_to new_session_path
37
37
end
38
38
39
39
def after_authentication_url
Original file line number Diff line number Diff line change @@ -10,24 +10,24 @@ class PasswordsController < ApplicationController
10
10
PasswordsMailer.reset(user).deliver_later
11
11
end
12
12
13
- redirect_to new_session_url , notice: "Password reset instructions sent (if user with that email address exists)."
13
+ redirect_to new_session_path , notice: "Password reset instructions sent (if user with that email address exists)."
14
14
end
15
15
16
16
def edit
17
17
end
18
18
19
19
def update
20
20
if @user.update(params.permit(:password, :password_confirmation))
21
- redirect_to new_session_url , notice: "Password has been reset."
21
+ redirect_to new_session_path , notice: "Password has been reset."
22
22
else
23
- redirect_to edit_password_url (params[:token]), alert: "Passwords did not match."
23
+ redirect_to edit_password_path (params[:token]), alert: "Passwords did not match."
24
24
end
25
25
end
26
26
27
27
private
28
28
def set_user_by_token
29
29
@user = User.find_by_password_reset_token!(params[:token])
30
30
rescue ActiveSupport::MessageVerifier::InvalidSignature
31
- redirect_to new_password_url , alert: "Password reset link is invalid or has expired."
31
+ redirect_to new_password_path , alert: "Password reset link is invalid or has expired."
32
32
end
33
33
end
Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ class SessionsController < ApplicationController
10
10
start_new_session_for user
11
11
redirect_to after_authentication_url
12
12
else
13
- redirect_to new_session_url , alert: "Try another email address or password."
13
+ redirect_to new_session_path , alert: "Try another email address or password."
14
14
end
15
15
end
16
16
17
17
def destroy
18
18
terminate_session
19
- redirect_to new_session_url
19
+ redirect_to new_session_path
20
20
end
21
21
end
You can’t perform that action at this time.
0 commit comments