blob: 0564e274379a9425b1e017de95a4f711e5181217 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
module I18n
def self.just_raise_that_exception(*args)
raise args.first
end
end
I18n.exception_handler = :just_raise_that_exception
module ActionView
module Helpers
module TranslationHelper
def translate(key, options = {})
translation = I18n.translate(scope_key_by_partial(key), options.merge!(:raise => true))
if html_safe_translation_key?(key) && translation.respond_to?(:html_safe)
translation.html_safe
else
translation
end
end
alias :t :translate
end
end
end
|