Skip to content

Commit 9d8ae6d

Browse files
authored
Remove whitespace from authentication generator templates (rails#52469)
These extra lines of whitespace cause failures from Rubocop's Layout/TrailingEmptyLines rule which is enabled by default in Rails at the time of writing. As such creating a brand new Rails app and then running `rails generate authentication` will give you Rubocop failures.
1 parent 4c9cfc4 commit 9d8ae6d

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

railties/lib/rails/generators/rails/authentication/templates/controllers/concerns/authentication.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,3 @@ def terminate_session
6161
cookies.delete(:session_token)
6262
end
6363
end
64-

railties/lib/rails/generators/rails/authentication/templates/models/current.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ class Current < ActiveSupport::CurrentAttributes
22
attribute :session
33
delegate :user, to: :session, allow_nil: true
44
end
5-

railties/lib/rails/generators/rails/authentication/templates/models/session.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ class Session < ApplicationRecord
22
has_secure_token
33
belongs_to :user
44
end
5-

0 commit comments

Comments
 (0)