Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove dead code

Christophe Bliardb0834002ba3c
diff --git a/app/controllers/projects/archive_controller.rb b/app/controllers/projects/archive_controller.rb
index 0c32d1c1dd2..e3fec4a88b1 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 996bace582b..44b48b0250c 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)