I found this beautiful post from thoughtbot, about this. It @Mylan Connolly solution, going a bit further.
Instead of searching directly in the ActionText
body field, which has HTML tags, it's better to convert that field to plain text, and perform the search in the converted field.
Posted in How to add logo image to mailer
Why is it necessary to set both
config.action_controller.asset_host = 'http://localhost:3000' config.action_mailer.asset_host = config.action_controller.asset_host
Is it not possible to just set the
config.action_mailer.asset_host = 'http://localhost:3000' to have the full url in the mail?
If we set the
images_tag across the application, in normal views, will also use the the full usrl as
src instead os just the relative path.