Revert on_load change due to breaking existing applications - #234
Merged
joshbuker merged 1 commit intoMay 1, 2020
Merged
Conversation
Member
Author
|
This should fix #227. |
|
Yes, seems to be fixed, thanks. |
Member
Author
|
Awesome, thanks for the confirmation @futuretap! I'll work on updating the changelog and shipping a new release. |
Hirurg103
added a commit
to Hirurg103/sorcery
that referenced
this pull request
Aug 10, 2020
[Sorcery#227] Before this commit sorcery config block was saved into a variable and called after including `Sorcery::Controller` into `ActionController::Base` (in the included block). In Sorcery#209 the initialization code was changed to include `Sorcery::Controller` into `ActionController::Base` after loading action controller (in the onload block) to fix deprecation warning related to autoloading. After this change calling the user model in the rails development console started to fail with "To use reset_password submodule, you must define a mailer" error (Sorcery#227), because sorcery config block was not called (calling the user model doesn't load action controller) and `::Sorcery::Controller::Config.user_config` was nil Because of this issue changes in Sorcery#209 have been reverted (Sorcery#234) There is no need to delay calling sorcery config block until `Sorcery::Controller` is included into `ActionController::Base` This commit changes the code to call sorcery config where it is defined. It will allow to apply changes in Sorcery#209 to fix deprecation warning from autoloading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.