dtext_field: use the field name as the label, not "Body".

For flags and appeals, the reason field should be labeled Reason, not Body.
This commit is contained in:
evazion
2017-04-13 15:14:38 -05:00
parent c90614272a
commit 18a2b2a221

View File

@@ -126,7 +126,7 @@ module ApplicationHelper
end
def dtext_field(object, name, options = {})
options[:name] ||= "Body"
options[:name] ||= name.capitalize
options[:input_id] ||= "#{object}_#{name}"
options[:input_name] ||= "#{object}[#{name}]"
options[:value] ||= instance_variable_get("@#{object}").try(name)