Skip to content

Instantly share code, notes, and snippets.

@matthewlehner
Last active August 29, 2015 13:57
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 matthewlehner/9499435 to your computer and use it in GitHub Desktop.
Save matthewlehner/9499435 to your computer and use it in GitHub Desktop.
Rails Mail Interceptor
# config/initializers/sandbox_email_interceptor.rb
ActionMailer::Base.register_interceptor(SandboxEmailInterceptor) if Rails.env.development?
class SandboxEmailInterceptor
def self.delivering_email(message)
binding.pry
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment