Class: Museum::CasesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Museum::CasesController
- Defined in:
- app/controllers/museum/cases_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
GET /cases.
-
#refresh ⇒ Object
PATCH/PUT /cases/gem-name/refresh.
-
#show ⇒ Object
GET /cases/gem-name.
Instance Method Details
#index ⇒ Object
GET /cases
6 7 8 |
# File 'app/controllers/museum/cases_controller.rb', line 6 def index @cases = Museum::Case.all end |
#refresh ⇒ Object
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 |
#show ⇒ Object
GET /cases/gem-name
11 12 13 |
# File 'app/controllers/museum/cases_controller.rb', line 11 def show @case.freshen_if_expired end |