]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Lint/ParenthesesAsGroupedExpression in lib/redmine/field_format.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 13:19:50 +0000 (13:19 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 13:19:50 +0000 (13:19 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19261 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/field_format.rb

index 2439f575e0d64dc6f7bbfbe34536e4a1ec3866d8..ecec9151168366023c552078cf271bb8ef1daa21 100644 (file)
@@ -384,7 +384,6 @@ Lint/Loop:
 
 Lint/ParenthesesAsGroupedExpression:
   Exclude:
-    - 'lib/redmine/field_format.rb'
     - 'test/functional/account_controller_test.rb'
     - 'test/functional/email_addresses_controller_test.rb'
     - 'test/functional/my_controller_test.rb'
index bc2def9629f1aba2838b2497db2d7ad501cf3c98..2fcd7b79b4f8723ddbe200c9991daf152e5873fd 100644 (file)
@@ -271,8 +271,8 @@ module Redmine
         url = custom_field.url_pattern.to_s.dup
         url.gsub!('%value%') {URI.encode value.to_s}
         url.gsub!('%id%') {URI.encode customized.id.to_s}
-        url.gsub!('%project_id%') {URI.encode (customized.respond_to?(:project) ? customized.project.try(:id) : nil).to_s}
-        url.gsub!('%project_identifier%') {URI.encode (customized.respond_to?(:project) ? customized.project.try(:identifier) : nil).to_s}
+        url.gsub!('%project_id%') {URI.encode((customized.respond_to?(:project) ? customized.project.try(:id) : nil).to_s)}
+        url.gsub!('%project_identifier%') {URI.encode((customized.respond_to?(:project) ? customized.project.try(:identifier) : nil).to_s)}
         if custom_field.regexp.present?
           url.gsub!(%r{%m(\d+)%}) do
             m = $1.to_i