Class: Blacksheep::Decorators::Localizer
Instance Method Summary
collapse
#__class__, #class, #decorators_chain
Instance Method Details
#call(params, current_user: nil, **options) ⇒ Object
7
8
9
10
11
12
13
14
15
|
# File 'lib/blacksheep/decorators/localizer.rb', line 7
def call(params, current_user: nil, **options)
if (locale = params[:_locale])
I18n.with_locale(locale) do
super
end
else
super
end
end
|
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/blacksheep/decorators/localizer.rb', line 17
def perform(params, current_user: nil, **options)
if (locale = params[:_locale])
I18n.with_locale(locale) do
super
end
else
super
end
end
|