Class: Users::RegistrationsController

Inherits:
Devise::RegistrationsController
  • Object
show all
Defined in:
app/controllers/users/registrations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /resource



14
15
16
# File 'app/controllers/users/registrations_controller.rb', line 14

def create
  super
end

#phcdevworks_accounts_payments_add_customerObject

The path used after sign up for inactive accounts. def after_inactive_sign_up_path_for(resource)

super(resource)

end



64
65
66
67
68
69
70
71
72
# File 'app/controllers/users/registrations_controller.rb', line 64

def phcdevworks_accounts_payments_add_customer
  if resource.valid?
    phcdevworks_accounts_customer = Stripe::Customer.create({
      email: current_user.email, name: current_user.firstname + " " + current_user.lastname
    })
    @user.payments_customer_id = phcdevworks_accounts_customer.id
    @user.save
  end
end