Permalink
Browse files

first attempt to extend the I18n.t method

  • Loading branch information...
gnagno committed Jul 16, 2011
1 parent 88f9335 commit 79519f332e99a925603c8d247cc4edf722aaaf3f
@@ -1,4 +1,8 @@
module LostI18nTranslation
module ApplicationHelper
+ def pippo(*args)
+ 'ciao ciao'
+ end
end
+ ApplicationHelper.send :include, LostI18nTranslation::ApplicationHelper
end
@@ -1,4 +1,6 @@
require "lost-i18n-translation/engine"
+require "lost-i18n-translation/i18n_ext"
+
module LostI18nTranslation
end
@@ -0,0 +1,7 @@
+module ActionView::Helpers::TranslationHelper
+ alias :t_old :t
+
+ def t(*args)
+ "prova: #{t_old(args)}"
+ end
+end

0 comments on commit 79519f3

Please sign in to comment.