Class: GoodJob::PausesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- GoodJob::PausesController
- Defined in:
- app/controllers/good_job/pauses_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/controllers/good_job/pauses_controller.rb', line 10 def create pause_type = params[:type].to_sym pause_value = params[:value].to_s GoodJob::Setting.pause(pause_type => pause_value) redirect_to({ action: :index }, notice: "Successfully paused #{params[:type]} '#{params[:value]}'") end |
#destroy ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/controllers/good_job/pauses_controller.rb', line 18 def destroy pause_type = params[:type].to_sym pause_value = params[:value].to_s GoodJob::Setting.unpause(pause_type => pause_value) redirect_to({ action: :index }, notice: "Successfully unpaused #{params[:type]} '#{params[:value]}'") end |