Skip to content

Instantly share code, notes, and snippets.

@ritikesh
Created August 25, 2020 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ritikesh/81d92119d74fe069726b44f69e863012 to your computer and use it in GitHub Desktop.
Save ritikesh/81d92119d74fe069726b44f69e863012 to your computer and use it in GitHub Desktop.
blog gists
class ApplicationMailer < ActionMailer::Base
before_action :block_spam_accounts, if: -> { Tenant.current.spam? }
private
def block_spam_accounts
message.perform_deliveries = false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment