sorcery
sorcery copied to clipboard
Add an option 'use_redirect_back_or_to_by_rails' to avoid definition conflicts of `redirect_back_or_to`
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