Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert on_load change due to breaking existing applications #234

Merged

Conversation

joshbuker
Copy link
Member

No description provided.

@joshbuker joshbuker added the bug Something isn't working label May 1, 2020
@joshbuker
Copy link
Member Author

This should fix #227.

@joshbuker joshbuker merged commit 6b72ca3 into Sorcery:master May 1, 2020
@joshbuker joshbuker deleted the bug/fix-on-load-breaking-things branch May 1, 2020 18:32
@futuretap
Copy link

Yes, seems to be fixed, thanks.

@joshbuker
Copy link
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants