Sha256: 349a6b331205be98a887b138104c7d77d4b183f2e43f82b13a6983dcde101848

Contents?: true

Size: 750 Bytes

Versions: 32

Compression:

Stored size: 750 Bytes

Contents

module Effective
  class CustomersController < ApplicationController
    before_action(:authenticate_user!) if defined?(Devise)

    include Effective::CrudController

    if (config = EffectiveOrders.layout)
      layout(config.kind_of?(Hash) ? (config[:customers] || config[:application]) : config)
    end

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

    def resource
      @customer = Effective::Customer.deep.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

32 entries across 32 versions & 1 rubygems

Version Path
effective_orders-6.17.2 app/controllers/effective/customers_controller.rb
effective_orders-6.17.1 app/controllers/effective/customers_controller.rb
effective_orders-6.17.0 app/controllers/effective/customers_controller.rb
effective_orders-6.16.4 app/controllers/effective/customers_controller.rb
effective_orders-6.16.3 app/controllers/effective/customers_controller.rb
effective_orders-6.16.2 app/controllers/effective/customers_controller.rb
effective_orders-6.16.1 app/controllers/effective/customers_controller.rb
effective_orders-6.16.0 app/controllers/effective/customers_controller.rb
effective_orders-6.15.0 app/controllers/effective/customers_controller.rb
effective_orders-6.14.6 app/controllers/effective/customers_controller.rb
effective_orders-6.14.5 app/controllers/effective/customers_controller.rb
effective_orders-6.14.4 app/controllers/effective/customers_controller.rb
effective_orders-6.14.3 app/controllers/effective/customers_controller.rb
effective_orders-6.14.2 app/controllers/effective/customers_controller.rb
effective_orders-6.14.1 app/controllers/effective/customers_controller.rb
effective_orders-6.14.0 app/controllers/effective/customers_controller.rb
effective_orders-6.13.3 app/controllers/effective/customers_controller.rb
effective_orders-6.13.2 app/controllers/effective/customers_controller.rb
effective_orders-6.13.1 app/controllers/effective/customers_controller.rb
effective_orders-6.13.0 app/controllers/effective/customers_controller.rb