Class: Effective::CustomersController

Inherits:
ApplicationController
  • Object
show all
Includes:
CrudController
Defined in:
app/controllers/effective/customers_controller.rb

Instance Method Summary collapse

Instance Method Details

#customer_paramsObject

StrongParameters



20
21
22
# File 'app/controllers/effective/customers_controller.rb', line 20

def customer_params
  params.require(:effective_subscripter).permit(:stripe_token)
end

#resourceObject



14
15
16
17
# File 'app/controllers/effective/customers_controller.rb', line 14

def resource
  @customer = Effective::Customer.where(user: current_user).first!
  @subscripter ||= Effective::Subscripter.new(customer: @customer, current_user: current_user)
end