diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-05-25 13:10:40 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-05-25 13:10:40 +0100 |
commit | af2d6d28571bb49d25b7982d1ba508b850a05b0f (patch) | |
tree | 8307be70f1dc02d6bd3cf4e005ff6d12b71166bc /app/models | |
parent | 1367bf94eb1f6bfcf96f873b0c395326ac61670c (diff) |
A new method for ContactMailer that sends messages to users from admins
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/contact_mailer.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/contact_mailer.rb b/app/models/contact_mailer.rb index 74c213c7a..800fe54e4 100644 --- a/app/models/contact_mailer.rb +++ b/app/models/contact_mailer.rb @@ -42,4 +42,16 @@ class ContactMailer < ApplicationMailer } end + # Send message to a user from the administrator + def from_admin_message(recipient_user, subject, message) + @from = contact_from_name_and_email + @recipients = recipient_user.name_and_email + @subject = subject + @body = { + :message => message, + :from_user => @from, + :recipient_user => recipient_user, + } + end + end |