Ask A Question

Notifications

You’re not receiving notifications from this thread.

Skipping Devise Confirmation for Stripe Signup

Brian Gilbank asked in Rails

Hi Chris - How could I skip the Devise confirmation if a user is signing up to pay with Stripe?

I am following this video on your stripe course: https://courses.gorails.com/courses/payments-with-rails-master-class/152586-subscriptions-with-stripe-billing/451458-3-4-new-subscription-form

I was hoping I could do something like below.

class Users::RegistrationsController < Devise::RegistrationsController
invisible_captcha only: [:create], honeypot: :telephone, scope: :user, on_spam: :return_succeded

def create
super
if @user.persisted?
UserMailer.newuser_email(@user).deliver
end
if @user.persisted? && current_user.subscribed?
@user.skip_confirmation!
@user.confirm
end
end

end

Thanks
Brian

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.