Skip to content

Commit 785b2c2

Browse files
committed
Fix example in Active Storage guide
url_for returns a URL, not a path. Also, as the text says, that URL points to the redirect controller, the "/redirect" segment was missing.
1 parent 1dbd2fa commit 785b2c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/active_storage_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ that is routed to the blob's [`RedirectController`][`ActiveStorage::Blobs::Redir
643643

644644
```ruby
645645
url_for(user.avatar)
646-
# => /rails/active_storage/blobs/:signed_id/my-avatar.png
646+
# => https://www.example.com/rails/active_storage/blobs/redirect/:signed_id/my-avatar.png
647647
```
648648

649649
The `RedirectController` redirects to the actual service endpoint. This

0 commit comments

Comments
 (0)