Class: MemberNotifier
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- MemberNotifier
- Defined in:
- app/mailer/member_notifier.rb
Instance Method Summary collapse
- #confirmation_instructions(member_id, current_localization_slug = "") ⇒ Object
- #password_reset_instructions(member_id, current_localization_slug = "") ⇒ Object
-
#welcome(member_id, current_localization_slug = "") ⇒ Object
welcome email will be sent to member when admin user will create member.
Instance Method Details
#confirmation_instructions(member_id, current_localization_slug = "") ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/mailer/member_notifier.rb', line 14 def confirmation_instructions(member_id , current_localization_slug = "") member = Gluttonberg::Member.find(member_id) setup_email @subject += "Confirmation Instructions" @recipients = member.email @member_confirmation_url = member_confirmation_url(:locale => current_localization_slug , :key => member.confirmation_key) end |
#password_reset_instructions(member_id, current_localization_slug = "") ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/mailer/member_notifier.rb', line 6 def password_reset_instructions(member_id , current_localization_slug = "") member = Gluttonberg::Member.find(member_id) setup_email @subject += "Password Reset Instructions" @recipients = member.email @edit_password_reset_url = edit_member_password_reset_url( current_localization_slug, member.perishable_token) end |
#welcome(member_id, current_localization_slug = "") ⇒ Object
welcome email will be sent to member when admin user will create member. this member will be automatically verified purpose of this email is to provide login details to the member
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/mailer/member_notifier.rb', line 25 def welcome(member_id, current_localization_slug = "") @member = Gluttonberg::Member.find(member_id) setup_email @subject += "Confirmation Instructions" @recipients = @member.email @password = Gluttonberg::Member.generateRandomString password_hash = { :password => @password , :password_confirmation => @password } @member.welcome_email_sent = true @member.assign_attributes(password_hash) @member.save @login_url = member_login_url end |