Raise error on "translation missing"
module I18n
def self.just_raise_that_exception(*args)
Rails.logger.error args.first
raise "i18n: #{args.first}" unless Rails.env.production?
end
end
I18n.exception_handler = :just_raise_that_exception
Modify the code here Ruby on Rails Guides: Rails Internationalization (I18n) API not to raise error on production and log errors.
Written by Hiroshige Umino
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Related Tags
#rails
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#