is there a global way I can write a before_filter for my user mailer, that checks to see if the user has emails disabled? Right now every mailer I have checks the user\'s se
I edited @naudster 's answer to get the information from message
class MyMailer < ActionMailer::Base
include AbstractController::Callbacks
after_filter :check_email
private
def check_email
if message.to.nil?
message.perform_deliveries = false
end
end
end