Skip to content

Commit dd44466

Browse files
authored
Merge pull request rails#54818 from codergeek121/fix-linter-errors-in-authentication-generator
Fix the indentation and whitespaces in the generated PasswordsController
2 parents 621aa49 + 8fd2567 commit dd44466

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

railties/lib/rails/generators/rails/authentication/templates/app/controllers/passwords_controller.rb.tt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
class PasswordsController < ApplicationController
22
allow_unauthenticated_access
33
before_action :set_user_by_token, only: %i[ edit update ]
4-
<% if defined?(ActionMailer::Railtie) -%>
4+
<%- if defined?(ActionMailer::Railtie) -%>
55
rate_limit to: 10, within: 3.minutes, only: :create, with: -> { redirect_to new_password_path, alert: "Try again later." }
6-
<% end -%>
6+
<%- end -%>
77

88
def new
99
end
10-
<% if defined?(ActionMailer::Railtie) -%>
10+
<%- if defined?(ActionMailer::Railtie) -%>
1111

1212
def create
1313
if user = User.find_by(email_address: params[:email_address])
@@ -16,7 +16,7 @@ class PasswordsController < ApplicationController
1616

1717
redirect_to new_session_path, notice: "Password reset instructions sent (if user with that email address exists)."
1818
end
19-
<% end -%>
19+
<%- end -%>
2020

2121
def edit
2222
end

0 commit comments

Comments
 (0)