Skip to content

Commit ce4b533

Browse files
committed
https://github.com/basecamp/mail_view/pull/71#discussion_r17883023
1 parent 9023f39 commit ce4b533

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/mail_view.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,12 @@ def not_found(pass = false)
100100
def build_mail(name)
101101
mail = nil
102102
ActiveRecord::Base.transaction do
103+
103104
mail = send(name)
105+
Mail.inform_interceptors(mail) if defined? Mail
106+
104107
raise ActiveRecord::Rollback
105108
end
106-
Mail.inform_interceptors(mail) if defined? Mail
107109
mail
108110
end
109111

0 commit comments

Comments
 (0)