Class: Ecm::UserArea::UserPasswordResetRequest
- Inherits:
-
Object
- Object
- Ecm::UserArea::UserPasswordResetRequest
- Extended by:
- ActiveModel::Callbacks
- Includes:
- ActiveModel::Model, ActiveModel::Validations::Callbacks
- Defined in:
- app/models/ecm/user_area/user_password_reset_request.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#host ⇒ Object
Returns the value of attribute host.
-
#user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
8 9 10 |
# File 'app/models/ecm/user_area/user_password_reset_request.rb', line 8 def email @email end |
#host ⇒ Object
Returns the value of attribute host.
8 9 10 |
# File 'app/models/ecm/user_area/user_password_reset_request.rb', line 8 def host @host end |
#user ⇒ Object
Returns the value of attribute user.
8 9 10 |
# File 'app/models/ecm/user_area/user_password_reset_request.rb', line 8 def user @user end |
Class Method Details
.call(attributes) ⇒ Object
10 11 12 |
# File 'app/models/ecm/user_area/user_password_reset_request.rb', line 10 def self.call(attributes) new(attributes).save end |
.i18n_scope ⇒ Object
14 15 16 |
# File 'app/models/ecm/user_area/user_password_reset_request.rb', line 14 def self.i18n_scope :activerecord end |
Instance Method Details
#save ⇒ Object
24 25 26 27 28 29 |
# File 'app/models/ecm/user_area/user_password_reset_request.rb', line 24 def save return unless valid? self.user.reset_perishable_token self.user.save Ecm::UserArea::UserMailer.password_reset_email(self.user, host).deliver_later end |