diff options
Diffstat (limited to 'activejob/lib/active_job/translation.rb')
-rw-r--r-- | activejob/lib/active_job/translation.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activejob/lib/active_job/translation.rb b/activejob/lib/active_job/translation.rb new file mode 100644 index 0000000000..67e4cf4ab9 --- /dev/null +++ b/activejob/lib/active_job/translation.rb @@ -0,0 +1,11 @@ +module ActiveJob + module Translation #:nodoc: + extend ActiveSupport::Concern + + included do + around_perform do |job, block, _| + I18n.with_locale(job.locale, &block) + end + end + end +end |