Method: AnnoTranslate.strict_mode
- Defined in:
- lib/annotranslate.rb
.strict_mode(enable_strict = true) ⇒ Object
Toggle whether to true an exception on all MissingTranslationData exceptions Useful during testing to ensure all keys are found. Passing true enables strict mode, false installs the default exception handler which does not raise on MissingTranslationData
182 183 184 185 186 187 188 189 190 191 |
# File 'lib/annotranslate.rb', line 182 def self.strict_mode(enable_strict = true) @@strict_mode = enable_strict if enable_strict # Switch to using contributed exception handler I18n.exception_handler = :strict_i18n_exception_handler else I18n.exception_handler = :default_exception_handler end end |