Class: Pgbus::BatchesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/pgbus/batches_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#pgbus

Instance Method Details

#indexObject



5
6
7
8
# File 'app/controllers/pgbus/batches_controller.rb', line 5

def index
  @batches = data_source.batches
  render_frame("pgbus/batches/batches_table") if params[:frame] == "list"
end

#showObject



10
11
12
13
# File 'app/controllers/pgbus/batches_controller.rb', line 10

def show
  @batch = data_source.batch_detail(params[:id])
  redirect_to batches_path, alert: t("pgbus.batches.show.not_found") unless @batch
end