-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Adding omniauthable to to Spree::User #98
Comments
No, you're running into a difficult problem that, fortunately, has been solved in another extension. Check the |
Thanks! I'll check that out. Meanwhile if anyone else encounters this, my solution is working: I added the module prepend to the routes file, forcing the |
I'm glad you got a working solution, but I'd wouldn't want to see the community adopting this strategy broadly. Adding my opinion for the record. |
Which is why I opened this issue in the first place :) |
Hi everyone, I've been having a few issues after adding omniauthable to the
Spree::User
class.I used a module to prepend calls to
devise
and add any necessary extra methods, the problem happens on development when classes are reloaded.I believe (haven't checked yet) that routes are reloaded before the core classes, so as soon as my routes file is read, it will setup the omniauthable routes, and load the
Spree::User
class but without my prepended module.This causes every class reload on development require a full server restart.
I tried solving this by creating a
::User
class, inherit fromSpree::User
and settingSpree.user_class = "::User"
but apparentlyconstantize
thinks that meansSpree::User
:(One thing that could help would be a hook to add extra parameters to the
devise
call, which would then correctly load omniauthable even before my prepended modules.What do you guys think? Am I doing some glaring stupid mistake?
The text was updated successfully, but these errors were encountered: