diff --git a/app/controllers/projects/archive_controller.rb b/app/controllers/projects/archive_controller.rb index 0c32d1c1dd..e3fec4a88b 100644 --- a/app/controllers/projects/archive_controller.rb +++ b/app/controllers/projects/archive_controller.rb @@ -45,11 +45,11 @@ class Projects::ArchiveController < ApplicationController service_call = change_status(status) if service_call.success? - redirect_to(project_path_with_status) + redirect_to(projects_path) else flash[:error] = t(:"error_can_not_#{status}_project", errors: service_call.errors.full_messages.join(', ')) - redirect_back fallback_location: project_path_with_status + redirect_back fallback_location: projects_path end end @@ -65,10 +65,4 @@ class Projects::ArchiveController < ApplicationController when :unarchive then Projects::UnarchiveService end end - - def project_path_with_status - acceptable_params = params.permit(:status).to_h.compact.select { |_, v| v.present? } - - projects_path(acceptable_params) - end end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 996bace582..44b48b0250 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -89,7 +89,7 @@ class ProjectsController < ApplicationController flash[:error] = I18n.t('projects.delete.schedule_failed', errors: service_call.errors.full_messages.join("\n")) end - redirect_to project_path_with_status + redirect_to projects_path end def destroy_info @@ -119,12 +119,6 @@ class ProjectsController < ApplicationController @project = nil end - def project_path_with_status - acceptable_params = params.permit(:status).to_h.compact.select { |_, v| v.present? } - - projects_path(acceptable_params) - end - def load_query @query = ParamsToQueryService.new(Project, current_user).call(params)