module StringExtension
String Extension
Public Instance Methods
localize(*args)
click to toggle source
# File lib/message_train/localization.rb, line 3 def localize(*args) sym = if args.first.is_a? Symbol args.shift else underscore.tr(' ', '_').gsub(/[^a-z0-9_]+/i, '').to_sym end args << { default: self } I18n.t(sym, *args).html_safe end
Also aliased as: l