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

#redirect_to

Instance Method Details

#destroyObject



14
15
16
17
# File 'app/controllers/roundhouse_ui/snapshots_controller.rb', line 14

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

#indexObject



5
6
7
# File 'app/controllers/roundhouse_ui/snapshots_controller.rb', line 5

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

#restoreObject



9
10
11
12
# File 'app/controllers/roundhouse_ui/snapshots_controller.rb', line 9

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