0

In my Ruby on Rails application I have multi step with wicked gem to create customer registration. I want to send confirmation at the last step so in my controller I use devise method:

@customer.skip_confirmation!

But this method is not sending confirmation email and automatically confirm customer. I don't want to have confirmed customer when he didn't click the link in mail. Is there any way to solve this problem?

Mateusz Urbański
  • 7,352
  • 15
  • 68
  • 133

2 Answers2

2

There is a good answer here:

Rails 3 with Devise for Authentication - How do I manually create a user?

It explains that skip_confirmation! method sets confirmed_at, and also supplies a workaround which allows you to skip confirmation without confirming the user.

Community
  • 1
  • 1
Hari Gopal
  • 718
  • 3
  • 7
1

If you don't want confirmation to be sent on create, neither a code to be generated, call skip_confirmation!

if you have added in your user.rb (model) the confirmable module, than the confirmation will be send by it self, right after the user have been created. So you don't need to add something in your controller other than @user.create!

Papouche Guinslyzinho
  • 5,277
  • 14
  • 58
  • 101