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



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

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

#resourceObject



10
11
12
13
# File 'app/controllers/effective/customers_controller.rb', line 10

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