Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Disallow calling `#deliver_later` after local message modifications. #24457
Prevents a common, hard-to-find bug where local message changes aren't enqueued with the delivery job:
message = Notifier.welcome(user, foo) message.message_id = my_generated_message_id message.deliver_later
The message_id is silently lost here! Only the mailer arguments are passed to the delivery job.
This raises an exception now.
Make modifications to the message within the mailer method or use a custom Active Job to manage delivery instead of using