From d1c3c83ed7979fbbe59cbababfa436bacd08db17 Mon Sep 17 00:00:00 2001 From: wvengen Date: Wed, 8 Jan 2014 18:23:34 +0100 Subject: [PATCH] use plural in table headings by default --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 52ec9256..4a266ece 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -81,10 +81,10 @@ module ApplicationHelper # heading, with an abbreviation title of 'foo'. # Other options are passed through to I18n. def heading_helper(model, attribute, options = {}) - i18nopts = options.select {|a| !['short'].include?(a) } + i18nopts = options.select {|a| !['short'].include?(a) }.merge({count: 2}) s = model.human_attribute_name(attribute, i18nopts) if options[:short] - sshort = model.human_attribute_name("#{attribute}_short".to_sym, options.merge({fallback: true, default: ''})) + sshort = model.human_attribute_name("#{attribute}_short".to_sym, options.merge({fallback: true, default: '', count: 2})) s = raw "#{sshort}" unless sshort.blank? end s