X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3af6ef2d42e3e6efb3ea8e1f32d34293f9b1011e..edebf116a9f743a7a276d514c4cbad72c3406922:/apps/workbench/app/controllers/application_controller.rb diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb index df95335cb8..18397e1008 100644 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base # Methods that don't require login should # skip_around_filter :require_thread_api_token around_filter :require_thread_api_token, except: ERROR_ACTIONS + before_filter :accept_uuid_as_id_param, except: ERROR_ACTIONS before_filter :check_user_agreements, except: ERROR_ACTIONS before_filter :check_user_notifications, except: ERROR_ACTIONS before_filter :load_filters_and_paging_params, except: ERROR_ACTIONS @@ -349,10 +350,14 @@ class ApplicationController < ActionController::Base end end - def find_object_by_uuid + + def accept_uuid_as_id_param if params[:id] and params[:id].match /\D/ params[:uuid] = params.delete :id end + end + + def find_object_by_uuid begin if not model_class @object = nil