Skip to content

Commit b995208

Browse files
authored
Merge pull request rails#42703 from ceritium/fix-active-storage-guide-links
Fix ActiveStorage guide links [ci-skip]
2 parents 28fbdfc + 5ff7116 commit b995208

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

guides/source/active_storage_overview.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,9 @@ require a higher level of protection consider implementing
549549
To generate a permanent URL for a blob, you can pass the blob to the
550550
[`url_for`][ActionView::RoutingUrlFor#url_for] view helper. This generates a
551551
URL with the blob's [`signed_id`][ActiveStorage::Blob#signed_id]
552-
that is routed to the blob's
553-
[`RedirectController`](ActiveStorage::Blobs::RedirectController).
552+
that is routed to the blob's [`RedirectController`][ActiveStorage::Blobs::RedirectController]
554553

554+
[ActiveStorage::Blobs::RedirectController]: https://github.com/rails/rails/blob/main/activestorage/app/controllers/active_storage/blobs/redirect_controller.rb
555555
```ruby
556556
url_for(user.avatar)
557557
# => /rails/active_storage/blobs/:signed_id/my-avatar.png
@@ -646,10 +646,10 @@ guess but permanent. Anyone that knows the blob URL will be able to access it,
646646
even if a `before_action` in your `ApplicationController` would otherwise
647647
require a login. If your files require a higher level of protection, you can
648648
implement your own authenticated controllers, based on the
649-
[`ActiveStorage::Blobs::RedirectController`](ActiveStorage::Blobs::RedirectController),
650-
[`ActiveStorage::Blobs::ProxyController`](ActiveStorage::Blobs::ProxyController),
651-
[`ActiveStorage::Representations::RedirectController`](ActiveStorage::Representations::RedirectController) and
652-
[`ActiveStorage::Representations::ProxyController`](ActiveStorage::Representations::ProxyController)
649+
[`ActiveStorage::Blobs::RedirectController`][],
650+
[`ActiveStorage::Blobs::ProxyController`][],
651+
[`ActiveStorage::Representations::RedirectController`][] and
652+
[`ActiveStorage::Representations::ProxyController`][]
653653

654654
To only allow an account to access their own logo you could do the following:
655655

@@ -684,10 +684,10 @@ config.active_storage.draw_routes = false
684684

685685
to prevent files being accessed with the publicly accessible URLs.
686686

687-
[ActiveStorage::Blobs::RedirectController]: (https://github.com/rails/rails/blob/main/activestorage/app/controllers/active_storage/blobs/redirect_controller.rb)
688-
[ActiveStorage::Blobs::ProxyController]: (https://github.com/rails/rails/blob/main/activestorage/app/controllers/active_storage/blobs/proxy_controller.rb)
689-
[ActiveStorage::Representations::RedirectController]: (https://github.com/rails/rails/blob/main/activestorage/app/controllers/active_storage/representations/redirect_controller.rb)
690-
[ActiveStorage::Representations::ProxyController]: (https://github.com/rails/rails/blob/main/activestorage/app/controllers/active_storage/representations/proxy_controller.rb)
687+
[`ActiveStorage::Blobs::RedirectController`]: https://github.com/rails/rails/blob/main/activestorage/app/controllers/active_storage/blobs/redirect_controller.rb
688+
[`ActiveStorage::Blobs::ProxyController`]: https://github.com/rails/rails/blob/main/activestorage/app/controllers/active_storage/blobs/proxy_controller.rb
689+
[`ActiveStorage::Representations::RedirectController`]: https://github.com/rails/rails/blob/main/activestorage/app/controllers/active_storage/representations/redirect_controller.rb
690+
[`ActiveStorage::Representations::ProxyController`]: https://github.com/rails/rails/blob/main/activestorage/app/controllers/active_storage/representations/proxy_controller.rb
691691

692692
Downloading Files
693693
-----------------

0 commit comments

Comments
 (0)