Closed karlentwistle closed 6 years ago
That failure looks unrelated, re-running tests.
Also this looks like its a good change to me, @brendandeere? You know this code better than I do.
Restarted the build again. Still randomly fails for unrelated reasons.
:+1: For using the built in solidus user class hook.
A custom user class would still need to implement the api expected by SolidusAuthDevise in order to function proplerly, but that seems like a reasonable expectation of someone providing a custom user class.
It might be worth looking into this hook and changing when it is run.
If you explicitly set a user_class in config/initializers/solidus.rb
, I believe the auth devise gem would still override that setting with its own user class.
It could be worth while to make auth devise set it's default value at a different time which still allows a developer to override the default from within an initializer file, rather than specifying an :after clause.
@karlentwistle would you mind to rebase on current master
? That should fix the failing build
Sorry for the delay I just returned from honeymoon. I have just rebased off master.
Make it possible to complete the process of overriding
Spree.user_class
while using solidus_auth_devise. Before this PR if a developer took advantage of setting their ownSpree.user_class
- for example.The hardcoded
'Spree::User'
(string) within the routes file would override this customisation and continue to incorrectly useSpree::User
rather thanUser
. Then meant when using devise built in helpers the user class returned would be incorrect - for example.Before this PR
current_spree_user.class => Spree::User
After this PRcurrent_spree_user.class => User