Class: InviteStrangerMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- InviteStrangerMailer
- Defined in:
- app/mailers/invite_stranger_mailer.rb
Instance Method Summary collapse
Instance Method Details
#invite_stranger(invitor, object, to_email) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/mailers/invite_stranger_mailer.rb', line 6 def invite_stranger(invitor, object, to_email) @invitor = invitor @object = object @object_type = object.class.name.casecmp('workgroup').zero? ? 'group' : object.class.name.downcase # Postmark metadatas ['object-type'] = @object_type mail( to: "<#{to_email}>", subject: "You have been invited to join a #{@object_type}", tag: 'invite-stranger' ) end |