Results 7 comments of atolix

@willnet Thank you for the review, and sorry for the late reply. >Could you please change the comment to use redirect_to_before_login_path instead of redirect_back_or_to in the initializer file ( https://github.com/sorcery/sorcery/blob/b3e7793e44ff649938302c9fd9bdb493179af06c/lib/generators/sorcery/templates/initializer.rb#L19...

@brendon @willnet Thanks for the feedback. Just to clarify, are you suggesting removing Sorcery’s own `redirect_back_or_to` method entirely (and relying only on Rails’ version), or renaming Sorcery’s method instead? Either...

@brendon @willnet Thanks for the suggestion. I've updated the code to use ActiveSupport::Deprecation.warn instead of warn so that it integrates with Rails' deprecation system. https://github.com/Sorcery/sorcery/pull/373/commits/edfa250eb7d69e4002add537091771530e2227f8

CI failed on Rails 7.2 or above with the following error: > NoMethodError: private method `warn' called for ActiveSupport::Deprecation:Class # ./lib/sorcery/controller.rb:103:in `redirect_back_or_to' # ./spec/rails_app/app/controllers/sorcery_controller.rb:45:in `test_redirect_back_or_to' # ./spec/controllers/controller_spec.rb:214:in `block (6 levels)...

@brendon Thanks for catching that. I've updated the code to define a dedicated Sorcery.deprecator instance instead of relying on ActiveSupport.deprecator, following the Rails documentation you linked. https://github.com/Sorcery/sorcery/pull/373/commits/26aed80fa438e6d98ca7c5703bbf0aab9f90a2b7

@willnet > As shown in the Rails documentation, could you add deprecators like the following inside sorcery/engine.rb? Added deprecators registration in sorcery/engine.rb. Thanks for the feedback! https://github.com/Sorcery/sorcery/pull/373/commits/eab0a7456ee8690ee25dee35d6d110d6e328174c

I’ve added a test in https://github.com/Sorcery/sorcery/pull/373/commits/1c92b2770f7ae78a798282e294f0a8eb748683ee