Been looking around for a solution and couldn't find any. I am trying to skip sending of the confirmation email and send it after a user account's password has been set. However, after the password is set the confirmed_at is also set, so it gets confirmed before the email confirmation link is used. Below is my code. Thanks in advance
I am skipping confirmation with this (user.rb)
before_save :skip_confirmation
def skip_confirmation
self.skip_confirmation!
end
Then when the user has set a password (user_controller.rb)
# Updating user password fields
....
@user.send_confirmation_instructions if password_set