Skip to content

Commit

Permalink
Merge branch '88-upgrade-action_mailer'
Browse files Browse the repository at this point in the history
  • Loading branch information
marnen committed Oct 23, 2013
2 parents 51c6ec9 + ba2c9d0 commit 142afbe
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/initializers/action_mailer_patch.rb
@@ -0,0 +1,14 @@
# Security patch from http://seclists.org/oss-sec/2013/q4/118
# TODO: remove when upgrading to Rails 3.2 or higher.

require 'action_mailer'

module ActionMailer
class LogSubscriber < ActiveSupport::LogSubscriber
def deliver(event)
recipients = Array.wrap(event.payload[:to]).join(', ')
info("\nSent mail to #{recipients} (#{event.duration.round(1)}ms)")
debug(event.payload[:mail])
end
end
end

0 comments on commit 142afbe

Please sign in to comment.