Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent reading inline attachments after
mail
was called from raisi…
…ng an inaccurate exception Without this change, `attachments.inline['my_attachment'].present?`, for example, would raise the exception `Can't add attachments after mail was called`. I first brought this issue up at rails#16163 (comment). Note that this commit addresses only one of the 2 problems I described in that comment. The other problem is that using `attachments.inline['my_attachment']` for reading an attachment is unnecessary--it's the same as `attachments['my_attachment']`--even before `mail` is called. We could add a warning about the unnecessary use of `inline` but I'm saving that for a later PR since my comment has not received any feedback yet.
- Loading branch information