Sha256: 9327774dd20ea7603c2c79942b6c2d69bad1f812555eeca37284d364f3d46a4a

Contents?: true

Size: 696 Bytes

Versions: 11

Compression:

Stored size: 696 Bytes

Contents

module Effective
  class CustomersController < ApplicationController
    layout (EffectiveOrders.layout.kind_of?(Hash) ? EffectiveOrders.layout[:customers] : EffectiveOrders.layout)

    include Effective::CrudController

    before_action :authenticate_user!

    submit :save, 'Save', success: -> { 'Successfully updated card.' }
    page_title 'Customer Settings'

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

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
effective_orders-4.6.3 app/controllers/effective/customers_controller.rb
effective_orders-4.6.2 app/controllers/effective/customers_controller.rb
effective_orders-4.6.0 app/controllers/effective/customers_controller.rb
effective_orders-4.5.12 app/controllers/effective/customers_controller.rb
effective_orders-4.5.11 app/controllers/effective/customers_controller.rb
effective_orders-4.5.10 app/controllers/effective/customers_controller.rb
effective_orders-4.5.9 app/controllers/effective/customers_controller.rb
effective_orders-4.5.8 app/controllers/effective/customers_controller.rb
effective_orders-4.5.7 app/controllers/effective/customers_controller.rb
effective_orders-4.5.6 app/controllers/effective/customers_controller.rb
effective_orders-4.5.5 app/controllers/effective/customers_controller.rb