Sha256: c3ab9e0a868aebc8ccd63e9c7bf1a5fc1572d57a56d6801e7ce8734cb1187ae6
Contents?: true
Size: 525 Bytes
Versions: 9
Compression:
Stored size: 525 Bytes
Contents
# frozen_string_literal: true module RailsServerMonitor class SnapshotsController < ApplicationController before_action :require_current_snapshot, only: :show def show @snapshot = current_snapshot @title = "Snapshot - #{@snapshot.id}" end def current_snapshot @current_snapshot ||= RailsServerMonitor::ServerSnapshot.find_by(id: params[:id]) end def require_current_snapshot redirect_to root_path, notice: "Server not found" if current_snapshot.blank? end end end
Version data entries
9 entries across 9 versions & 1 rubygems