Class: Museum::CasesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/museum/cases_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /cases



6
7
8
# File 'app/controllers/museum/cases_controller.rb', line 6

def index
  @cases = Museum::Case.all
end

#refreshObject

PATCH/PUT /cases/gem-name/refresh



16
17
18
19
20
21
22
# File 'app/controllers/museum/cases_controller.rb', line 16

def refresh
  if @case.freshen
    redirect_to @case.reload, notice: :success.l
  else
    redirect_to @case, error: :failure.l
  end
end

#showObject

GET /cases/gem-name



11
12
13
# File 'app/controllers/museum/cases_controller.rb', line 11

def show
  @case.freshen_if_expired
end