Class: RailsServerMonitor::SnapshotsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RailsServerMonitor::SnapshotsController
- Defined in:
- app/controllers/rails_server_monitor/snapshots_controller.rb
Instance Method Summary collapse
Instance Method Details
#current_snapshot ⇒ Object
13 14 15 |
# File 'app/controllers/rails_server_monitor/snapshots_controller.rb', line 13 def current_snapshot @current_snapshot ||= RailsServerMonitor::ServerSnapshot.find_by(id: params[:id]) end |
#require_current_snapshot ⇒ Object
17 18 19 |
# File 'app/controllers/rails_server_monitor/snapshots_controller.rb', line 17 def require_current_snapshot redirect_to root_path, notice: "Server not found" if current_snapshot.blank? end |
#show ⇒ Object
7 8 9 10 11 |
# File 'app/controllers/rails_server_monitor/snapshots_controller.rb', line 7 def show @snapshot = current_snapshot @title = "Snapshot - #{@snapshot.id}" end |