Skip to content

Revert on_load change due to breaking existing applications - #234

Merged
joshbuker merged 1 commit into
Sorcery:masterfrom
joshbuker:bug/fix-on-load-breaking-things
May 1, 2020
Merged

joshbuker merged 1 commit into
Sorcery:masterfrom
joshbuker:bug/fix-on-load-breaking-things

Conversation

@joshbuker

Copy link
Copy Markdown
Member

No description provided.

@joshbuker joshbuker added the bug Something isn't working label May 1, 2020
@joshbuker

Copy link
Copy Markdown
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
Copy Markdown

Yes, seems to be fixed, thanks.

@joshbuker

Copy link
Copy Markdown
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