Class: DeliverChangePasswordJob
- Inherits:
-
Object
- Object
- DeliverChangePasswordJob
- Defined in:
- app/models/deliver_change_password_job.rb
Overview
Delivers the BlueLightSpecial.deliver_mimi_change_password to the requested User by id
as an asynchronous process.
Instance Attribute Summary collapse
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(user_id) ⇒ DeliverChangePasswordJob
constructor
A new instance of DeliverChangePasswordJob.
- #perform ⇒ Object
Constructor Details
#initialize(user_id) ⇒ DeliverChangePasswordJob
Returns a new instance of DeliverChangePasswordJob.
9 10 11 |
# File 'app/models/deliver_change_password_job.rb', line 9 def initialize(user_id) @user_id = user_id.kind_of?(User) ? user_id.id : user_id end |
Instance Attribute Details
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
7 8 9 |
# File 'app/models/deliver_change_password_job.rb', line 7 def user_id @user_id end |
Instance Method Details
#perform ⇒ Object
13 14 15 16 17 |
# File 'app/models/deliver_change_password_job.rb', line 13 def perform if user = User.find_by_id(@user_id) BlueLightSpecialMailer.deliver_change_password(user) end end |