forked from Coursemology/coursemology2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable deliver_later patch introduced in rails 5
- See rails/rails#24457 and rails/rails#26916
- Loading branch information
1 parent
ff5ad97
commit 35f0503
Showing
6 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# frozen_string_literal: true | ||
module Extensions::ActionMailerSuppression; end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# frozen_string_literal: true | ||
module Extensions::ActionMailerSuppression::ActionMailer; end |
15 changes: 15 additions & 0 deletions
15
lib/extensions/action_mailer_suppression/action_mailer/message_delivery.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This extension disables the check introduced in rails/rails#24457, which disables the | ||
# accessing or mutation of the +MessageDelivery+ object through raising an exception. | ||
# | ||
# Since Coursemology uses mailing templates (see #mail in +ActivityMailer+), this | ||
# extension reverses that patch. | ||
# | ||
# See rails/rails#26916 for potential progress / discussions on this issue, | ||
# or consider building a custom ActiveJob instead of #deliver_later. | ||
module Extensions::ActionMailerSuppression::ActionMailer::MessageDelivery | ||
module PrependMethods | ||
def processed? | ||
false | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters