Files
dunlop-core/app/controllers/dunlop/execution_batches_controller.rb
2018-01-20 13:02:44 -03:00

19 lines
437 B
Ruby

class Dunlop::ExecutionBatchesController < Dunlop::ApplicationController
respond_to :html
def index
authorize! :index, ExecutionBatch
@q = ExecutionBatch.search(query)
@q.sorts = 'created_at desc' if @q.sorts.empty?
@batches = @q.result.page(params[:page])
respond_with(@batches)
end
def show
@record = ExecutionBatch.find(params[:id])
authorize! :show, @record
respond_with(@record)
end
end