From 20bd86fe653c6a1185ca5e339bb8476eb720dc54 Mon Sep 17 00:00:00 2001 From: wvengen Date: Sun, 24 Nov 2013 01:59:44 +0100 Subject: [PATCH] make heading_helper work with empty _short translation --- 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 59994432..ef516a67 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -84,8 +84,8 @@ module ApplicationHelper i18nopts = options.select {|a| !['short'].include?(a) } s = model.human_attribute_name(attribute, i18nopts) if options[:short] - sshort = model.human_attribute_name("#{attribute}_short".to_sym, options.merge({defaults: ''})) - s = raw "#{sshort}" unless sshort.empty? + sshort = model.human_attribute_name("#{attribute}_short".to_sym, options.merge({fallback: true, default: ''})) + s = raw "#{sshort}" unless sshort.blank? end s end