Commit c9d48c5
committed
Call sorcery config block where it is defined
[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
autoloading1 parent a02c124 commit c9d48c5
File tree
3 files changed
+4
-7
lines changed- lib/sorcery
- controller
- spec/controllers
3 files changed
+4
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 57 | + | |
| 58 | + | |
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
0 commit comments