Passing arguments to noticed Notifier config
Hello, I watched the screencast and tried to follow the documentation but I can't seem to figure out this. I have a mailer ReservationMailer method that receives two arguments in its signature like so:
def reservation_reminder_email(reservation, purchase_prompt)
...
Then I have a ReservationReminderNotifier with a configuration like this:
deliver_by :email do |config|
config.mailer = "ReservationMailer"
config.method = "reservation_reminder_email"
config.args = -> { [record, purchase_prompt] }
end
And I call it like this:
ReservationReminderNotifier.with(record: @reservation, purchase_prompt: "no").deliver(reservation.customer)
My understanding is that in this case config.args would be the arguments passed to the mailer however, what I can't figure out is how can I get the named parameters of the notifier (the ones in the with) within this configuration block so I can pass those as arguments to the mailer, if I try to reference record or purchase_prompt I get nothing.
Thanks in advance!