1 # A simple exception handler that behaves like the default exception handler
 
   2 # but also raises on missing translations.
 
   4 # Useful for identifying missing translations during testing.
 
   8 #   require 'globalize/i18n/missing_translations_raise_handler
 
   9 #   I18n.exception_handler = :missing_translations_raise_handler
 
  12     def missing_translations_raise_handler(exception, locale, key, options)
 
  17 #  self.exception_handler = :missing_translations_raise_handler
 
  20 I18n.exception_handler = :missing_translations_raise_handler
 
  22 ActionView::Helpers::TranslationHelper.module_eval do
 
  23   def translate(key, options = {})
 
  24     I18n.translate(key, options)