Sha256: 7738c0803ef414f5ebd4cfd2e4a9ece1f8e31375b4fe7402efcca14994908388

Contents?: true

Size: 722 Bytes

Versions: 14

Compression:

Stored size: 722 Bytes

Contents

module Admin
  class OrdersController < ApplicationController
    before_filter :authenticate_user!   # This is devise, ensure we're logged in.

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

    def index
      @datatable = Effective::Datatables::Orders.new() if defined?(EffectiveDatatables)
      @page_title = 'Orders'

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

    def show
      @order = Effective::Order.find(params[:id])
      @page_title = "Order ##{@order.to_param}"

      EffectiveOrders.authorized?(self, :show, @order)
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
effective_orders-1.8.1 app/controllers/admin/orders_controller.rb
effective_orders-1.8.0 app/controllers/admin/orders_controller.rb
effective_orders-1.7.5 app/controllers/admin/orders_controller.rb
effective_orders-1.7.4 app/controllers/admin/orders_controller.rb
effective_orders-1.7.3 app/controllers/admin/orders_controller.rb
effective_orders-1.7.2 app/controllers/admin/orders_controller.rb
effective_orders-1.7.1 app/controllers/admin/orders_controller.rb
effective_orders-1.7.0 app/controllers/admin/orders_controller.rb
effective_orders-1.6.6 app/controllers/admin/orders_controller.rb
effective_orders-1.6.5 app/controllers/admin/orders_controller.rb
effective_orders-1.6.4 app/controllers/admin/orders_controller.rb
effective_orders-1.6.3 app/controllers/admin/orders_controller.rb
effective_orders-1.6.1 app/controllers/admin/orders_controller.rb
effective_orders-1.6.0 app/controllers/admin/orders_controller.rb