ActionMailer deliver_method can be different like :smtp, :test, etc.
We will create a new custom delivery method to do something along with (or instead of) sending email.
# Related area of style guide: https://github.com/GetJobber/ruby-style-guide#hash-fetch-defaults | |
# Pros: Is succinct and intuitive | |
# Cons: Doesn't work for false values | |
def default_one(options) | |
options[:foo] ||= 'foo' | |
options[:bar] ||= 'bar' | |
end | |
# Pros: Handles false without issue, is succient |