lib/hyper-i18n/hyperloop/component/mixin.rb in hyper-i18n-0.99.0 vs lib/hyper-i18n/hyperloop/component/mixin.rb in hyper-i18n-0.99.1
- old
+ new
@@ -1,9 +1,9 @@
module Hyperloop
class Component
module Mixin
def t(attribute, opts = {})
- namespace = self.class.name.underscore.tr('/', '.')
+ namespace = self.class.name.underscore.gsub(%r{::|/}, '.')
HyperI18n::I18n.t("#{namespace}.#{attribute}", opts)
end
def l(time, format = :default, opts = {})