Module: TextHelpers

Defined in:
lib/text_helpers.rb,
lib/text_helpers/rspec.rb,
lib/text_helpers/railtie.rb,
lib/text_helpers/version.rb,
lib/text_helpers/translation.rb

Defined Under Namespace

Modules: RSpec, Translation Classes: ExternalLinks, Railtie, RaiseExceptionHandler

Constant Summary collapse

VERSION =
"1.1.1"

Class Method Summary collapse

Class Method Details

.install_i18n_exception_handlerObject

Public: Install an instance of TextHelpers::RaiseExceptionHandler as the default I18n exception handler.

Returns the handler instance.



23
24
25
26
27
28
29
# File 'lib/text_helpers.rb', line 23

def self.install_i18n_exception_handler
  if I18n.exception_handler
    Rails.logger.warn("Overwriting existing I18n exception handler")
  end

  I18n.exception_handler = RaiseExceptionHandler.new
end