Changes redmine attribute i18n.

pull/72/head
Martin Czuchra 12 years ago
parent 82e75e3066
commit 2815770661
  1. 5
      config/initializers/10-patches.rb

@ -20,10 +20,15 @@ module ActiveRecord
# Translate attribute names for validation errors display
def self.human_attribute_name(attr, options = {})
begin
options = options.merge({:raise => true})
super(attr, options)
rescue I18n::MissingTranslationData => e
l("field_#{attr.to_s.gsub(/_id$/, '')}")
end
end
end
end
module ActiveModel
class Errors

Loading…
Cancel
Save