0

So I'm creating a very basic Spree Rails app. I was able to access the Admin panel by just going to http://localhost:3000/admin But after setting up the authentication when I try to access the administration after entering my email and password I get that I have to verify my email. How can I verify my user email using the console?

Steven Aguilar
  • 3,107
  • 5
  • 39
  • 89

2 Answers2

2

This should do the trick,

user = Spree::User.find_by(email: 'spree@example.com')
user.confirm!
Priyank Gupta
  • 411
  • 3
  • 8
0

This worked for me in my Spree Rails app, I think if your using Devise this will work.

user = Spree::User.first
user.password='123456'
user.password_confirmation='123456'
user.email='youremail@example.com'
user.skip_confirmation!
user.save
Steven Aguilar
  • 3,107
  • 5
  • 39
  • 89