From f30df2c88d621a73783276ab56a5e49f2031f6dd Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Wed, 10 Aug 2011 12:09:40 -0700 Subject: [PATCH] Fix invitation email subject --- config/initializers/locale.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb index 6428eb8cc..0e7730cef 100644 --- a/config/initializers/locale.rb +++ b/config/initializers/locale.rb @@ -20,3 +20,14 @@ AVAILABLE_LANGUAGE_CODES.each do |c| end end +# There's almost certainly a better way to do this. +# Maybe by loading our paths in the initializer hooks, they'll end up after the gem paths? +class I18n::Railtie + class << self + def initialize_i18n_with_path_cleanup *args + initialize_i18n_without_path_cleanup *args + I18n.load_path.reject!{|path| path.match(/devise_invitable/) } + end + alias_method_chain :initialize_i18n, :path_cleanup + end +end