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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add a convenience show route that redirects to the queried page
Klaus Zanders62c953558016
diff --git a/app/controllers/projects/queries_controller.rb b/app/controllers/projects/queries_controller.rbindex cc37266a0b0..37377be694e 100644--- a/app/controllers/projects/queries_controller.rb+++ b/app/controllers/projects/queries_controller.rb@@ -31,13 +31,17 @@ class Projects::QueriesController < ApplicationController# No need for a more specific authorization check. That is carried out in the contracts.before_action :require_login- before_action :find_query, only: %i[rename update destroy publish unpublish]+ before_action :find_query, only: %i[show rename update destroy publish unpublish]before_action :build_query_or_deny_access, only: %i[new create]current_menu_item [:new, :rename, :create, :update] do:projectsend+ def show+ redirect_to projects_path(query_id: @query.id)+ end+def newrender template: "/projects/index",layout: "global",diff --git a/config/routes.rb b/config/routes.rbindex 80c29d6a84e..06c8a660b8b 100644--- a/config/routes.rb+++ b/config/routes.rb@@ -181,7 +181,7 @@ Rails.application.routes.draw donamespace :projects doresource :menu, only: %i[show]- resources :queries, only: %i[new create update destroy] do+ resources :queries, only: %i[show new create update destroy] domember doget :rename