mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-10 21:24:20 +01:00
12 lines
266 B
Ruby
12 lines
266 B
Ruby
|
module FabManager
|
||
|
module Middleware
|
||
|
class ServerLocale
|
||
|
def call(worker_class, job, queue)
|
||
|
locale = job['locale'] || Rails.application.secrets.rails_locale
|
||
|
I18n.with_locale(locale) do
|
||
|
yield
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|