summaryrefslogtreecommitdiffstats
path: root/config/initializers/10-patches.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/10-patches.rb')
-rw-r--r--config/initializers/10-patches.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb
index dc847de50..672f1c0a0 100644
--- a/config/initializers/10-patches.rb
+++ b/config/initializers/10-patches.rb
@@ -5,7 +5,9 @@ module ActiveRecord
include Redmine::I18n
# Translate attribute names for validation errors display
def self.human_attribute_name(attr, *args)
- l("field_#{attr.to_s.gsub(/_id$/, '')}", :default => attr)
+ attr = attr.to_s.sub(/_id$/, '')
+
+ l("field_#{name.underscore.gsub('/', '_')}_#{attr}", :default => ["field_#{attr}".to_sym, attr])
end
end
end