Class: Naf::MachineRunnersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/naf/machine_runners_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/naf/machine_runners_controller.rb', line 6

def index
  respond_to do |format|
    format.html
    format.json do
      set_page

      @total_records = ::Naf::MachineRunner.count(:all)
      @rows = ::Logical::Naf::MachineRunner.to_array(params['iSortCol_0'].to_i, params['sSortDir_0']).
        paginate(page: @page, per_page: @rows_per_page)

      render layout: 'naf/layouts/jquery_datatables'
    end
  end
end

#showObject



21
22
23
# File 'app/controllers/naf/machine_runners_controller.rb', line 21

def show
  @machine_runner = Naf::MachineRunner.find(params[:id])
end