Class: NPlusInsight::DetectionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/n_plus_insight/detections_controller.rb

Instance Method Summary collapse

Instance Method Details

#clearObject



12
13
14
15
# File 'app/controllers/n_plus_insight/detections_controller.rb', line 12

def clear
  Store.clear
  redirect_to root_path, status: :see_other, notice: "Stored detections cleared."
end

#indexObject



3
4
5
# File 'app/controllers/n_plus_insight/detections_controller.rb', line 3

def index
  @detections = Store.all
end

#showObject



7
8
9
10
# File 'app/controllers/n_plus_insight/detections_controller.rb', line 7

def show
  @detection = Store.find(params[:id])
  return head :not_found unless @detection
end