lib/active_scaffold/extensions/localize.rb in active_scaffold-3.4.43 vs lib/active_scaffold/extensions/localize.rb in active_scaffold-3.5.0

- old
+ new

@@ -1,10 +1,9 @@ class Object def as_(key, options = {}) - unless key.blank? - text = I18n.translate("#{key}", {:scope => [:active_scaffold, *options.delete(:scope)], :default => key.is_a?(String) ? key : key.to_s.titleize}.merge(options)).html_safe + if key.present? + text = I18n.translate(key.to_s, {:scope => [:active_scaffold, *options.delete(:scope)], :default => key.is_a?(String) ? key : key.to_s.titleize}.merge(options)).html_safe # text = nil if text.include?('translation missing:') end - text ||= key - text + text || key end end