sorcery icon indicating copy to clipboard operation
sorcery copied to clipboard

Add an option 'use_redirect_back_or_to_by_rails' to avoid definition conflicts of `redirect_back_or_to`

Open atolix opened this issue 9 months ago • 1 comments

Fix: https://github.com/Sorcery/sorcery/issues/296

Rails 7 released a new method called redirect_back_or_to as a replacement for redirect_back. That may conflicts with the method by the same name defined by Sorcery.

This commit adds an option to set whether to use redirect_back_or_to defined by Rails 7, and add a method redirect_to_before_login_path as an alternative to sorcery's `redirect_back_or_to.

ref: https://github.com/rails/rails/pull/40671

Please ensure your pull request includes the following:

  • [x] Description of changes
  • [x] Update to CHANGELOG.md with short description and link to pull request
  • [x] Changes have related RSpec tests that ensure functionality does not break

atolix avatar May 01 '24 06:05 atolix