Mange / roadie-rails

Making HTML emails comfortable for the Rails rockstars
MIT License
367 stars 66 forks source link

Why not use config.action_mailer.default_url_options as defaults for config.roadie.url_options? #57

Closed koenpunt closed 7 years ago

koenpunt commented 8 years ago

I've configured roadie like this:

config.roadie.url_options = config.action_mailer.default_url_options

Which seems sensible enough to be the default IMO.

What do you think?

Mange commented 8 years ago

If you've configured it, then all links in your email would be absolute and you wouldn't need to configure it for Roadie AFAIK. Am I missing something?

Den fre 18 mars 2016 14:49Koen Punt notifications@github.com skrev:

I've configured roadie like this:

config.roadie.url_options = config.action_mailer.default_url_options

Which seems sensible enough to be the default IMO.

What do you think?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/Mange/roadie-rails/issues/57

koenpunt commented 8 years ago

The default_url_options are not used for assets, only for links, so image paths are still untouched.

koenpunt commented 8 years ago

That being said, having those as default for assets wouldn't be desired, but for links it would be

Mange commented 8 years ago

Yeah, in the context of Rails you can handle both from the framework out of the box (default_url_options and asset_host), so path rewriting isn't the biggest feature in the context of Rails.

Den lör 19 mars 2016 17:35Koen Punt notifications@github.com skrev:

That being said, having those as default for assets wouldn't be desired, but for links it would be

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/Mange/roadie-rails/issues/57#issuecomment-198745888

koenpunt commented 8 years ago

But I believe asset_host isn't supported?

Mange commented 8 years ago

It's not fully automatic no, but it's possible to get it to work using a URL rewriting provider for your assets.

One could also opt for writing the styles inside the email and there should also be no problem with the asset host.

Den sön 20 mars 2016 12:06Koen Punt notifications@github.com skrev:

But I believe asset_host isn't supported?

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/Mange/roadie-rails/issues/57#issuecomment-198898145