Sha256: 5f39ffbe87756a8341b485e64f9eead93b186c5a53bf124033bc8525fbbb204e

Contents?: true

Size: 726 Bytes

Versions: 2

Compression:

Stored size: 726 Bytes

Contents

module Admin
  class CustomersController < ApplicationController
    respond_to?(:before_action) ? before_action(:authenticate_user!) : before_filter(:authenticate_user!) # Devise

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

    def index
      if Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
        @datatable = Effective::Datatables::Customers.new()
      else
        @datatable = EffectiveCustomersDatatable.new(self)
      end

      @page_title = 'Customers'

      EffectiveOrders.authorized?(self, :admin, :effective_orders)
      EffectiveOrders.authorized?(self, :index, Effective::Customer)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
effective_orders-2.2.4 app/controllers/admin/customers_controller.rb
effective_orders-2.2.3 app/controllers/admin/customers_controller.rb