Use Active Storage to render custom images
Just like we did with regular attachments, we're moving the logic to generate URLs out of the model. Note we're changing the `image_path_for` helper method in order to return a `polymorphic_path` because sometimes it's used in combination with `favicon_link_tag`, and `favicon_link_tag` doesn't automatically generate a polymorphic URL when given an `ActiveStorage::Attachment` record.
This commit is contained in:
BIN
spec/fixtures/files/apple-touch-icon-custom-200.png
vendored
Normal file
BIN
spec/fixtures/files/apple-touch-icon-custom-200.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Reference in New Issue
Block a user