minor refactoring of flash messages
This commit is contained in:
@ -22,7 +22,7 @@ module ApplicationHelper
|
||||
def label_column(label)
|
||||
content_tag(:div, class: 'col-sm-3') do
|
||||
content_tag(:strong) do
|
||||
translation_present?("activerecord.attributes.#{label}") ? t("activerecord.attributes.#{label}") : t(label)
|
||||
I18n.translation_present?("activerecord.attributes.#{label}") ? t("activerecord.attributes.#{label}") : t(label)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -60,11 +60,6 @@ module ApplicationHelper
|
||||
end
|
||||
end
|
||||
|
||||
def translation_present?(key)
|
||||
I18n.t(key, default: '').present?
|
||||
end
|
||||
private :translation_present?
|
||||
|
||||
def value_column(value)
|
||||
content_tag(:div, class: 'col-sm-9') do
|
||||
block_given? ? yield : symbol_for(value)
|
||||
|
Reference in New Issue
Block a user