Class: Sidekiq::Middleware::ActionMailerDefaultUrlOption::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/action_mailer_auto_url_options/middleware/sidekiq.rb

Overview

Pull the message’s Action Mailer default URL options out and set the current thread to use them.

Instance Method Summary collapse

Instance Method Details

#call(worker, msg, queue) ⇒ Object



15
16
17
18
19
# File 'lib/action_mailer_auto_url_options/middleware/sidekiq.rb', line 15

def call(worker, msg, queue)
  options = msg['action_mailer_default_url_options'].symbolize_keys
  ActionMailer::Base.default_url_options = options if options
  yield
end