Class: RoundhouseUi::SnapshotsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/roundhouse_ui/snapshots_controller.rb

Constant Summary

Constants inherited from ApplicationController

ApplicationController::AUDIT_VERBS

Instance Method Summary collapse

Methods inherited from ApplicationController

allow_in_read_only, guard_in_read_only, #redirect_to, requires_capability

Instance Method Details

#destroyObject



16
17
18
19
# File 'app/controllers/roundhouse_ui/snapshots_controller.rb', line 16

def destroy
  RoundhouseUi::Snapshots.delete(params[:id])
  redirect_to snapshots_path, notice: "Snapshot deleted."
end

#indexObject



7
8
9
# File 'app/controllers/roundhouse_ui/snapshots_controller.rb', line 7

def index
  @snapshots = RoundhouseUi::Snapshots.all
end

#restoreObject



11
12
13
14
# File 'app/controllers/roundhouse_ui/snapshots_controller.rb', line 11

def restore
  count = RoundhouseUi::Snapshots.restore(params[:id])
  redirect_to snapshots_path, notice: "Restored #{count} job(s) to their queue."
end