14965: Mocks FreshBase _poll_time to avoid comparing mock and int
[arvados.git] / apps / workbench / app / controllers / actions_controller.rb
index beeae0760c21dfe2558483176000347c25167ad9..b1bbb122670dcb6b11aac21d915f26174851aed9 100644 (file)
@@ -3,19 +3,20 @@
 # SPDX-License-Identifier: AGPL-3.0
 
 require "arvados/collection"
+require "app_version"
 
 class ActionsController < ApplicationController
 
   # Skip require_thread_api_token if this is a show action
   # for an object uuid that supports anonymous access.
-  skip_around_filter :require_thread_api_token, if: proc { |ctrl|
+  skip_around_action :require_thread_api_token, if: proc { |ctrl|
     Rails.configuration.anonymous_user_token and
     'show' == ctrl.action_name and
     params['uuid'] and
     model_class.in?([Collection, Group, Job, PipelineInstance, PipelineTemplate])
   }
-  skip_filter :require_thread_api_token, only: [:report_issue_popup, :report_issue]
-  skip_filter :check_user_agreements, only: [:report_issue_popup, :report_issue]
+  skip_around_action :require_thread_api_token, only: [:report_issue_popup, :report_issue]
+  skip_before_action :check_user_agreements, only: [:report_issue_popup, :report_issue]
 
   @@exposed_actions = {}
   def self.expose_action method, &block
@@ -203,7 +204,7 @@ You can try recreating the collection to get a copy with full provenance data."
 
     respond_to do |format|
       IssueReporter.send_report(current_user, params).deliver
-      format.js {render nothing: true}
+      format.js {render body: nil}
     end
   end