[ARVADOS] updated: 1b412404a88309c10acc567c8cca74484049d7e5

Git user git at public.curoverse.com
Wed Nov 9 19:14:31 EST 2016


Summary of changes:
 apps/workbench/app/controllers/application_controller.rb | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

       via  1b412404a88309c10acc567c8cca74484049d7e5 (commit)
      from  d7c2ff977813e095b3dfcba82f534f6b5236b596 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 1b412404a88309c10acc567c8cca74484049d7e5
Author: radhika <radhika at curoverse.com>
Date:   Wed Nov 9 19:12:56 2016 -0500

    10310: the ensure_arvados_api_exists method doesn't need any extra check on which controller; just using model_class works.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 6353d82..c5dd093 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -215,12 +215,9 @@ class ApplicationController < ActionController::Base
   end
 
   def ensure_arvados_api_exists
-    ctrl =  params['controller'].to_sym
-    if [:jobs, :job_tasks, :pipeline_instances, :pipeline_templates].include?(ctrl)
-      if model_class < ArvadosBase && !model_class.api_exists?(params['action'].to_sym)
-        @errors = ["#{params['action']} method is not supported for #{ctrl}"]
-        return render_error(status: 404)
-      end
+    if model_class < ArvadosBase && !model_class.api_exists?(params['action'].to_sym)
+      @errors = ["#{params['action']} method is not supported for #{params['controller']}"]
+      return render_error(status: 404)
     end
   end
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list