Sha256: 8cc693a982a012532ffc268e4daf7822434e7f9658cb5071a84f462156ad2658
Contents?: true
Size: 345 Bytes
Versions: 29
Compression:
Stored size: 345 Bytes
Contents
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 # text = nil if text.include?('translation missing:') end text ||= key text end end
Version data entries
29 entries across 29 versions & 1 rubygems