From 97a461635e987291e8f0f76a932611244d9e9115 Mon Sep 17 00:00:00 2001 From: jazairi <16103405+jazairi@users.noreply.github.com> Date: Wed, 29 Jul 2026 09:28:20 -0700 Subject: [PATCH] Rename process_theses to process_thesis Why these changes are being introduced: The process_theses controller action takes a single thesis, despite being plurally named. Relevant ticket(s): - [ETD-692](https://mitlibraries.atlassian.net/browse/ETD-692) How this addresses that need: This renames process_theses to process_thesis for clarity. Side effects of this change: None. --- app/controllers/thesis_controller.rb | 4 ++-- app/models/ability.rb | 4 ++-- .../{process_theses.html.erb => process_thesis.html.erb} | 0 config/routes.rb | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename app/views/thesis/{process_theses.html.erb => process_thesis.html.erb} (100%) diff --git a/app/controllers/thesis_controller.rb b/app/controllers/thesis_controller.rb index b44498f6..c1390d61 100644 --- a/app/controllers/thesis_controller.rb +++ b/app/controllers/thesis_controller.rb @@ -110,14 +110,14 @@ def update redirect_to thesis_confirm_path end - def process_theses + def process_thesis @thesis = Thesis.with_attached_files.includes([:departments, { authors: [:user], degrees: [:degree_type] }]).find(params[:id]) @other_theses_with_holds = @thesis.other_theses_with_holds.to_a end - def process_theses_update + def process_thesis_update thesis = Thesis.find(params[:id]) removed = deleted_file_list params[:thesis][:files_complete] = false if removed.count.positive? diff --git a/app/models/ability.rb b/app/models/ability.rb index d393aa50..7ffc7ed3 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -78,8 +78,8 @@ def processor can :deduplicate, Thesis can :mark_downloaded, Thesis can :mark_withdrawn, Thesis - can :process_theses, Thesis - can :process_theses_update, Thesis + can :process_thesis, Thesis + can :process_thesis_update, Thesis can :publication_statuses, Thesis can :publish_preview, Thesis can :publish_to_dspace, Thesis diff --git a/app/views/thesis/process_theses.html.erb b/app/views/thesis/process_thesis.html.erb similarity index 100% rename from app/views/thesis/process_theses.html.erb rename to app/views/thesis/process_thesis.html.erb diff --git a/config/routes.rb b/config/routes.rb index 6bedbe2c..5fe63014 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -40,8 +40,8 @@ get 'thesis/confirm', to: 'thesis#confirm', as: 'thesis_confirm' get 'thesis/deduplicate', to: 'thesis#deduplicate', as: 'thesis_deduplicate' get 'thesis/publication_statuses', to: 'thesis#publication_statuses', as: 'thesis_publication_statuses' - get 'thesis/:id/process', to: 'thesis#process_theses', as: 'thesis_process' - patch 'thesis/:id/process', to: 'thesis#process_theses_update', as: 'thesis_process_update' + get 'thesis/:id/process', to: 'thesis#process_thesis', as: 'thesis_process' + patch 'thesis/:id/process', to: 'thesis#process_thesis_update', as: 'thesis_process_update' get 'thesis/publish_preview', to: 'thesis#publish_preview', as: 'thesis_publish_preview' get 'thesis/publish', to: 'thesis#publish_to_dspace', as: 'thesis_publish_to_dspace' get 'thesis/select', to: 'thesis#select', as: 'thesis_select'