summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-03-17 11:50:44 +0000
committerGo MAEDA <maeda@farend.jp>2022-03-17 11:50:44 +0000
commite1ae7f5c8418cf0c908a78e86913bdab3cd35491 (patch)
treeb9c8848b2f0cd7b5c02589b63201a6dc338bfeb8
parent9462fb4e2caf1dcadb2d27d92005784774a2a779 (diff)
downloadredmine-e1ae7f5c8418cf0c908a78e86913bdab3cd35491.tar.gz
redmine-e1ae7f5c8418cf0c908a78e86913bdab3cd35491.zip
Use a variable to reference a CustomField object (#14275).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@21459 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/custom_fields_helper.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb
index fd5dcb9db..0ff648d9d 100644
--- a/app/helpers/custom_fields_helper.rb
+++ b/app/helpers/custom_fields_helper.rb
@@ -79,18 +79,19 @@ module CustomFieldsHelper
# Return custom field html tag corresponding to its format
def custom_field_tag(prefix, custom_value)
- css = custom_value.custom_field.css_classes
+ cf = custom_value.custom_field
+ css = cf.css_classes
data = nil
- if custom_value.custom_field.full_text_formatting?
+ if cf.full_text_formatting?
css += ' wiki-edit'
data = {
:auto_complete => true
}
end
- custom_value.custom_field.format.edit_tag(
+ cf.format.edit_tag(
self,
- custom_field_tag_id(prefix, custom_value.custom_field),
- custom_field_tag_name(prefix, custom_value.custom_field),
+ custom_field_tag_id(prefix, cf),
+ custom_field_tag_name(prefix, cf),
custom_value,
:class => css,
:data => data)