Class: DeliverWelcomeJob
- Inherits:
-
Object
- Object
- DeliverWelcomeJob
- 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
-
#initialize(user_id) ⇒ DeliverWelcomeJob
constructor
A new instance of DeliverWelcomeJob.
- #perform ⇒ Object
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
#perform ⇒ Object
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 |