Skip to content

Commit

Permalink
Update Action Mailer guide on how to add images
Browse files Browse the repository at this point in the history
Unlike controllers, mailers can't infer the protocol from the request,
so users need to specify it.
  • Loading branch information
MatheusRich committed Oct 25, 2023
1 parent a60a5d0 commit f18e3d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion guides/source/action_mailer_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,13 @@ As the `:asset_host` usually is consistent across the application you can
configure it globally in `config/application.rb`:

```ruby
config.asset_host = 'http://example.com'
config.action_mailer.asset_host = 'http://example.com'
```

NOTE: Because we can't infer the protocol from the request, you'll need to
specify a protocol such as `http://` or `https://` in the
`:asset_host` config.

Now you can display an image inside your email.

```html+erb
Expand Down

0 comments on commit f18e3d3

Please sign in to comment.