Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. module I18n
  2. class MyExceptionHandler < ExceptionHandler
  3. def call(exception, locale, key, options)
  4. return 'ASD'
  5. end
  6. end
  7. end
  8.  
  9. I18n.exception_handler = I18n::MyExceptionHandler.new
  10.  
  11.  
  12. # vagrant@precise32:/vagrant$ rails c
  13. # Loading development environment (Rails 4.1.0)
  14. # 2.1.1 :001 > I18n::config.exception_handler
  15. # => #<I18n::MyExceptionHandler:0x891aad4>
  16. # 2.1.1 :002 > I18n.exception_handler
  17. # => #<I18n::MyExceptionHandler:0x891aad4>
  18. # 2.1.1 :003 >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement