module StringExtension
String Extension
Public Instance Methods
localize(*args)
click to toggle source
# File lib/date_book/localization.rb, line 5 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