Class: Users::RegistrationsController
- Inherits:
-
Devise::RegistrationsController
- Object
- Devise::RegistrationsController
- Users::RegistrationsController
- Defined in:
- app/controllers/users/registrations_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /resource.
-
#phcdevworks_accounts_stripe_add_customer ⇒ Object
The path used after sign up for inactive accounts.
Instance Method Details
#create ⇒ Object
POST /resource
14 15 16 |
# File 'app/controllers/users/registrations_controller.rb', line 14 def create super end |
#phcdevworks_accounts_stripe_add_customer ⇒ Object
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_stripe_add_customer if resource.valid? phcdevworks_accounts_devise_customer = Stripe::Customer.create({ email: current_user.email, name: current_user.firstname + " " + current_user.lastname }) @user.payments_customer_id = phcdevworks_accounts_devise_customer.id @user.save end end |