make heading_helper work with empty _short translation
This commit is contained in:
parent
e5471b9f73
commit
20bd86fe65
1 changed files with 2 additions and 2 deletions
|
@ -84,8 +84,8 @@ module ApplicationHelper
|
||||||
i18nopts = options.select {|a| !['short'].include?(a) }
|
i18nopts = options.select {|a| !['short'].include?(a) }
|
||||||
s = model.human_attribute_name(attribute, i18nopts)
|
s = model.human_attribute_name(attribute, i18nopts)
|
||||||
if options[:short]
|
if options[:short]
|
||||||
sshort = model.human_attribute_name("#{attribute}_short".to_sym, options.merge({defaults: ''}))
|
sshort = model.human_attribute_name("#{attribute}_short".to_sym, options.merge({fallback: true, default: ''}))
|
||||||
s = raw "<abbr title='#{s}'>#{sshort}</abbr>" unless sshort.empty?
|
s = raw "<abbr title='#{s}'>#{sshort}</abbr>" unless sshort.blank?
|
||||||
end
|
end
|
||||||
s
|
s
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue