summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-07-11 09:35:32 +0000
committerGo MAEDA <maeda@farend.jp>2024-07-11 09:35:32 +0000
commit47d7dd0187c432a2236fec3510dbfbd1aa3efd4a (patch)
tree177be8c7d26cb0ba80bc673226fce215252e9325 /app/controllers
parent480975a0f5e947f86921b144cb47c970f1e4c4d4 (diff)
downloadredmine-47d7dd0187c432a2236fec3510dbfbd1aa3efd4a.tar.gz
redmine-47d7dd0187c432a2236fec3510dbfbd1aa3efd4a.zip
Fix RuboCop offense Style/CollectionCompact (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22921 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/issues_controller.rb9
-rw-r--r--app/controllers/projects_controller.rb2
2 files changed, 5 insertions, 6 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 5fbb0f7c2..089da28a7 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -700,11 +700,10 @@ class IssuesController < ApplicationController
def redirect_after_create
if params[:continue]
url_params = {}
- url_params[:issue] =
- {
- :tracker_id => @issue.tracker,
- :parent_issue_id => @issue.parent_issue_id
- }.reject {|k, v| v.nil?}
+ url_params[:issue] = {
+ :tracker_id => @issue.tracker,
+ :parent_issue_id => @issue.parent_issue_id
+ }.compact
url_params[:back_url] = params[:back_url].presence
if params[:project_id]
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 91616d619..f9a390c58 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -115,7 +115,7 @@ class ProjectsController < ApplicationController
format.html do
flash[:notice] = l(:notice_successful_create)
if params[:continue]
- attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?}
+ attrs = {:parent_id => @project.parent_id}.compact
redirect_to new_project_path(attrs)
else
redirect_to settings_project_path(@project)