about summary refs log tree commit diff stats
path: root/app/mailers/vote_mailer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers/vote_mailer.rb')
-rw-r--r--app/mailers/vote_mailer.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/mailers/vote_mailer.rb b/app/mailers/vote_mailer.rb new file mode 100644 index 0000000..90d2868 --- /dev/null +++ b/app/mailers/vote_mailer.rb
@@ -0,0 +1,9 @@
1class VoteMailer < ApplicationMailer
2 helper :votes
3
4 def daily_report_email
5 @entries = params[:votes].group_by { |v| "#{v.votable_type}_#{v.votable_id}" }.values
6 # weird way of getting the admin's email
7 mail to: User.first.email, subject: "[Four Island] You have upvotes!"
8 end
9end