Hello everybody! I just wanted to ask if I can con...
# support
s
Hello everybody! I just wanted to ask if I can confirm my user's email in console? I saw there's a method in Spree like this:
Copy code
user = Spree::User.find_by(email: '<mailto:spree@example.com|spree@example.com>')
user.confirm!
But there isn't this method in solidus gem. How can I fix this?
k
Hello! You can use confirmable with Solidus Auth Devise. It should add a
confirm
method to the user (ref here). So it should just be
user.confirm
, let me know if that works!
BTW: I can’t find that method in Spree, can you point me to where you did find it?
Where should I put the method at since there is no user model?
k
The method is already there, you can just use it . By the way, the model is in the Solidus Auth Devise extension
👍 1
s
I'm wondering why there's no model file in the folder?
k
models are in the engines you installed via your Gemfile. For example, the user models is here: https://github.com/solidusio/solidus_auth_devise/blob/master/app/models/spree/user.rb
👀 1
s
I see. So how can I customize the model? If I want to modify other models
k
There are several ways to do that, depending on what you need to customize. Here’s a page on our guides that explain how to customize classes coming from core and extensions. If you still need help with something more specific, please let me know.
🙏 1