Skip to content

Commit

Permalink
disable Style/ArgumentsForwarding check
Browse files Browse the repository at this point in the history
Rubocop/Standard wants to use `&` instead of `&block` and that newer
syntax rule breaks Ruby 3.0.4 tests
  • Loading branch information
minaslater committed May 10, 2024
1 parent ee12a9d commit f683ab9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/clearance/authentication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ def current_user
#
# Signing in will also regenerate the CSRF token for the current session,
# provided {Configuration#rotate_csrf_on_sign_in?} is set.
def sign_in(user, &)
clearance_session.sign_in(user, &)
# Disabling this because rubocop/standardrb wants to change `&block` to `&`,
# and that breaks Ruby 3.0.4 tests
# rubocop:disable Style/ArgumentsForwarding
def sign_in(user, &block)
clearance_session.sign_in(user, &block)
# rubocop:enable Style/ArgumentsForwarding

if signed_in? && Clearance.configuration.rotate_csrf_on_sign_in?
if request.respond_to?(:reset_csrf_token)
Expand Down
2 changes: 1 addition & 1 deletion lib/clearance/authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def store_location

# @api private
def redirect_back_or(default, **)
redirect_to(return_to || default, **)
redirect_to(return_to || default, **options)
clear_return_to
end

Expand Down

0 comments on commit f683ab9

Please sign in to comment.