If asset_host is set as a 2 arguement Proc, asset tag helpers will fall over at compute_asset_host when called from mailer views because Mailers do not have access to a request object.
I've created a small patch that modifies compute_asset_host to return nil in place of a request object if it's not present:
I have a question: Does anyone use the request argument in their Proc for anything other than checking for SSL? Looking back at the original ticket, that was the primary reason for the change:
I have a question: Does anyone use the request argument in their Proc
for anything other than checking for SSL? Looking back at the original
ticket, that was the primary reason for the change:
Yes. We use it to check the user agent among other things. So that
can't go.
I thought I saw someone having another solution to the Action Mailer
issue?