class Object
Public Instance Methods
Source
# File lib/active_scaffold/extensions/localize.rb, line 2 def as_(key, options = {}) if key.present? scope = [:active_scaffold, *options.delete(:scope)] options = options.reverse_merge(scope: scope, default: key.is_a?(String) ? key : key.to_s.titleize) text = I18n.t(key.to_s, **options).html_safe # text = nil if text.include?('translation missing:') end text || key end