summaryrefslogtreecommitdiffstats
path: root/lib/redmine/field_format.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-13 12:40:33 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-13 12:40:33 +0000
commitb250912d179d2119f4a7e20676d26a1d123558d5 (patch)
tree75a60e3a830b03d617a794b75c405b3f5f210499 /lib/redmine/field_format.rb
parent9b10341df8270498438cf04d4a04956c21f71b0a (diff)
downloadredmine-b250912d179d2119f4a7e20676d26a1d123558d5.tar.gz
redmine-b250912d179d2119f4a7e20676d26a1d123558d5.zip
use "do end" instead of {} at lib/redmine/field_format.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20359 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/field_format.rb')
-rw-r--r--lib/redmine/field_format.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb
index 04b4cf9ea..9dd06c5b8 100644
--- a/lib/redmine/field_format.rb
+++ b/lib/redmine/field_format.rb
@@ -271,16 +271,16 @@ module Redmine
url = custom_field.url_pattern.to_s.dup
url.gsub!('%value%') {Addressable::URI.encode value.to_s}
url.gsub!('%id%') {Addressable::URI.encode customized.id.to_s}
- url.gsub!('%project_id%') {
+ url.gsub!('%project_id%') do
Addressable::URI.encode(
(customized.respond_to?(:project) ? customized.project.try(:id) : nil).to_s
)
- }
- url.gsub!('%project_identifier%') {
+ end
+ url.gsub!('%project_identifier%') do
Addressable::URI.encode(
(customized.respond_to?(:project) ? customized.project.try(:identifier) : nil).to_s
)
- }
+ end
if custom_field.regexp.present?
url.gsub!(%r{%m(\d+)%}) do
m = $1.to_i