app/controllers/naf/historical_jobs_controller.rb in naf-1.1.4 vs app/controllers/naf/historical_jobs_controller.rb in naf-2.0.0

- old
+ new

@@ -1,8 +1,9 @@ module Naf class HistoricalJobsController < Naf::ApplicationController include Naf::ApplicationHelper + helper Naf::TimeHelper before_filter :set_rows_per_page before_filter :set_search_status def index @@ -100,14 +101,10 @@ end end end end - def edit - @historical_job = Naf::HistoricalJob.find(params[:id]) - end - def update respond_to do |format| @historical_job = Naf::HistoricalJob.find(params[:id]) if @historical_job.update_attributes(params[:historical_job]) if params[:historical_job][:request_to_terminate].present? @@ -117,10 +114,11 @@ queued_job.delete end if running_job = ::Naf::RunningJob.find_by_id(params[:id]) running_job.update_attributes(request_to_terminate: true) + @historical_job.update_attributes(request_to_terminate: true) end end format.html do redirect_to(@historical_job, notice: "Job '#{@historical_job.command}' was successfully updated.") @@ -148,10 +146,9 @@ if application = job.application hash[:application_url] = url_for(application) else hash[:application_url] = nil end - hash[:papertrail_url] = naf_papertrail_link(job) return hash end end