Class: DeliverWelcomeJob

Inherits:
Object
  • Object
show all
Defined in:
app/models/deliver_welcome_job.rb

Overview

Delivers the UserMailer.deliver_mimi_welcome to the requested User by id as an asynchronous process.

Instance Method Summary collapse

Constructor Details

#initialize(user_id) ⇒ DeliverWelcomeJob

Returns a new instance of DeliverWelcomeJob.



7
8
9
# File 'app/models/deliver_welcome_job.rb', line 7

def initialize(user_id)
  @user_id = user_id
end

Instance Method Details

#performObject



11
12
13
14
15
# File 'app/models/deliver_welcome_job.rb', line 11

def perform
  if user = User.find_by_id(@user_id)
    HeadstartMailer.deliver_welcome(user)
  end
end