app/helpers/admin/configuration_helper.rb in trusty-cms-2.0.28 vs app/helpers/admin/configuration_helper.rb in trusty-cms-3.0.0
- old
+ new
@@ -18,10 +18,10 @@
else
value = setting.selected_value || setting.value
html << content_tag(:span, value, :id => domkey, :class => options[:class])
end
html << content_tag(:span, " #{t("units.#{setting.units}")}", :class => 'units') if setting.units
- html << content_tag(:span, " #{t('warning')}: #{[setting.errors.get(:value)].flatten.first}", :class => 'warning') if setting.errors.get(:value)
+ html << content_tag(:span, " #{t('warning')}: #{[setting.errors[:value]].flatten.first}", :class => 'warning') if setting.errors
Rails.logger.error(html)
html.html_safe
end
# Renders the setting as label and appropriate input field: