I had previously a mailer set up to send me emails to all user accounts. But now I'm trying to debug it. So I gutted it out completely and it still sends emails to me.
I have absolutely no reasoning or understanding as to why. Insanity! :D
controller
def org_blast_send
Delayed::Job.enqueue OrgBlast.new(params[:subject], params[:editor1])
redirect_to org_blast_admin_email_blast_path
end
org_blast.rb
class OrgBlast < Struct.new(:subject, :editor1)
def perform
# You see? There is absolute nothing here but it still sends an email.
# However, if I rename this file, the website fails looking for it.
end
end
notifier.rb
def org_blast(org, subject, message)
subject subject
from NOTIFIER_EMAIL
recipients org.users.first.email
sent_on Time.zone.now
body :user => org.users.first.first_name + ' ' + org.users.first.last_name, :message => message
content_type "text/html"
end