Class: GoodJob::CronEntriesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- GoodJob::CronEntriesController
- Defined in:
- app/controllers/good_job/cron_entries_controller.rb
Instance Method Summary collapse
Instance Method Details
#disable ⇒ Object
26 27 28 29 30 |
# File 'app/controllers/good_job/cron_entries_controller.rb', line 26 def disable @cron_entry = CronEntry.find(params[:cron_key]) @cron_entry.disable redirect_back(fallback_location: cron_entries_path, notice: t(".notice")) end |
#enable ⇒ Object
20 21 22 23 24 |
# File 'app/controllers/good_job/cron_entries_controller.rb', line 20 def enable @cron_entry = CronEntry.find(params[:cron_key]) @cron_entry.enable redirect_back(fallback_location: cron_entries_path, notice: t(".notice")) end |
#enqueue ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/good_job/cron_entries_controller.rb', line 14 def enqueue @cron_entry = CronEntry.find(params[:cron_key]) use_original_locale { @cron_entry.enqueue(Time.current) } redirect_back(fallback_location: cron_entries_path, notice: t(".notice")) end |
#index ⇒ Object
5 6 7 |
# File 'app/controllers/good_job/cron_entries_controller.rb', line 5 def index @cron_entries = CronEntry.all end |
#show ⇒ Object
9 10 11 12 |
# File 'app/controllers/good_job/cron_entries_controller.rb', line 9 def show @cron_entry = CronEntry.find(params[:cron_key]) @jobs_filter = JobsFilter.new(params, @cron_entry.jobs) end |