Skip to content

Commit f18e3d3

Browse files
committed
Update Action Mailer guide on how to add images
Unlike controllers, mailers can't infer the protocol from the request, so users need to specify it.
1 parent a60a5d0 commit f18e3d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

guides/source/action_mailer_basics.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,13 @@ As the `:asset_host` usually is consistent across the application you can
634634
configure it globally in `config/application.rb`:
635635

636636
```ruby
637-
config.asset_host = 'http://example.com'
637+
config.action_mailer.asset_host = 'http://example.com'
638638
```
639639

640+
NOTE: Because we can't infer the protocol from the request, you'll need to
641+
specify a protocol such as `http://` or `https://` in the
642+
`:asset_host` config.
643+
640644
Now you can display an image inside your email.
641645

642646
```html+erb

0 commit comments

Comments
 (0)