Sha256: 626e2bb0a73fe4327d2ebca52adeb5d8fb9ecc5281a21288ea9941c0b22c5003

Contents?: true

Size: 672 Bytes

Versions: 25

Compression:

Stored size: 672 Bytes

Contents

module Admin
  class CustomersController < ApplicationController
    before_action :authenticate_user!

    layout (EffectiveOrders.layout.kind_of?(Hash) ? EffectiveOrders.layout[:admin_customers] : EffectiveOrders.layout)

    def index
      @datatable = Admin::EffectiveCustomersDatatable.new(self)

      @page_title = 'Customers'

      EffectiveOrders.authorize!(self, :admin, :effective_orders)
      EffectiveOrders.authorize!(self, :index, Effective::Customer)
    end

    def show
      @customer = Effective::Customer.find(params[:id])

      @page_title ||= @customer.to_s
      EffectiveOrders.authorize!(self, :show, Effective::Customer)
    end

  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
effective_orders-4.6.3 app/controllers/admin/customers_controller.rb
effective_orders-4.6.2 app/controllers/admin/customers_controller.rb
effective_orders-4.6.0 app/controllers/admin/customers_controller.rb
effective_orders-4.5.12 app/controllers/admin/customers_controller.rb
effective_orders-4.5.11 app/controllers/admin/customers_controller.rb
effective_orders-4.5.10 app/controllers/admin/customers_controller.rb
effective_orders-4.5.9 app/controllers/admin/customers_controller.rb
effective_orders-4.5.8 app/controllers/admin/customers_controller.rb
effective_orders-4.5.7 app/controllers/admin/customers_controller.rb
effective_orders-4.5.6 app/controllers/admin/customers_controller.rb
effective_orders-4.5.5 app/controllers/admin/customers_controller.rb
effective_orders-4.5.4 app/controllers/admin/customers_controller.rb
effective_orders-4.5.3 app/controllers/admin/customers_controller.rb
effective_orders-4.5.2 app/controllers/admin/customers_controller.rb
effective_orders-4.5.1 app/controllers/admin/customers_controller.rb
effective_orders-4.5.0 app/controllers/admin/customers_controller.rb
effective_orders-4.4.10 app/controllers/admin/customers_controller.rb
effective_orders-4.4.9 app/controllers/admin/customers_controller.rb
effective_orders-4.4.8 app/controllers/admin/customers_controller.rb
effective_orders-4.4.7 app/controllers/admin/customers_controller.rb