Rails3 mailer with image_tag ignoring host
Asked Answered
H

1

9

I've got a Rails3 mailer layout that include images.

This ones are used like :

image_tag("emails/top.gif", :width => "700", :height => "10", :alt => "")

As of Rails 2, this images included the host and produced the expected result. However, since Rails3 the config.action_mailer.default_url_options seems to be ignored.

Is there anything I'm missing?

Update

my config/environment/development.rb include:

config.action_mailer.default_url_options = { :host => 'mydomain.tld' }
Henrie answered 15/3, 2011 at 10:59 Comment(1)
Answered by wmoxam in #rubyonrails : Needs to use config.action_mailer.asset_host in your environment config file.Casia
H
21

Needs to use config.action_mailer.asset_host = 'http://mysite.com' in your environment config file

Credits: wmoxam in #rubyonrails

Henrie answered 30/5, 2011 at 17:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.