class VoteMailer < ApplicationMailer helper :votes def daily_report_email @entries = params[:votes].group_by { |v| "#{v.votable_type}_#{v.votable_id}" }.values # weird way of getting the admin's email mail to: User.first.email, subject: "[Four Island] You have upvotes!" end end