aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/models/active_storage/variant.rb
diff options
context:
space:
mode:
authorKoichi ITO <koic.ito@gmail.com>2017-08-11 12:36:07 +0900
committerKoichi ITO <koic.ito@gmail.com>2017-08-11 13:15:23 +0900
commitd90f26156279c2dd53eaabeb8794e8ecd2b3d0fa (patch)
tree56870b6d6dbcd30ca26d03063dcbeb8b947ae267 /activestorage/app/models/active_storage/variant.rb
parentcb3c227c456bcbcd91c4a8fac4ff46f255621514 (diff)
downloadrails-d90f26156279c2dd53eaabeb8794e8ecd2b3d0fa.tar.gz
rails-d90f26156279c2dd53eaabeb8794e8ecd2b3d0fa.tar.bz2
rails-d90f26156279c2dd53eaabeb8794e8ecd2b3d0fa.zip
Fix formatting of Active Storage docs [ci skip]
Follow up of #30188.
Diffstat (limited to 'activestorage/app/models/active_storage/variant.rb')
-rw-r--r--activestorage/app/models/active_storage/variant.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activestorage/app/models/active_storage/variant.rb b/activestorage/app/models/active_storage/variant.rb
index ab9d3ad999..b9b93b4c1b 100644
--- a/activestorage/app/models/active_storage/variant.rb
+++ b/activestorage/app/models/active_storage/variant.rb
@@ -9,17 +9,17 @@
# into memory. The larger the image, the more memory is used. Because of this process, you also want to be
# considerate about when the variant is actually processed. You shouldn't be processing variants inline in a
# template, for example. Delay the processing to an on-demand controller, like the one provided in
-# `ActiveStorage::VariantsController`.
+# ActiveStorage::VariantsController.
#
# To refer to such a delayed on-demand variant, simply link to the variant through the resolved route provided
# by Active Storage like so:
#
# <%= image_tag url_for(Current.user.avatar.variant(resize: "100x100")) %>
#
-# This will create a URL for that specific blob with that specific variant, which the `ActiveStorage::VariantsController`
+# This will create a URL for that specific blob with that specific variant, which the ActiveStorage::VariantsController
# can then produce on-demand.
#
-# When you do want to actually produce the variant needed, call `#processed`. This will check that the variant
+# When you do want to actually produce the variant needed, call +#processed+. This will check that the variant
# has already been processed and uploaded to the service, and, if so, just return that. Otherwise it will perform
# the transformations, upload the variant to the service, and return itself again. Example:
#
@@ -52,12 +52,12 @@ class ActiveStorage::Variant
end
# Returns the URL of the variant on the service. This URL is intended to be short-lived for security and not used directly
- # with users. Instead, the `service_url` should only be exposed as a redirect from a stable, possibly authenticated URL.
- # Hiding the `service_url` behind a redirect also gives you the power to change services without updating all URLs. And
- # it allows permanent URLs that redirect to the `service_url` to be cached in the view.
+ # with users. Instead, the +service_url+ should only be exposed as a redirect from a stable, possibly authenticated URL.
+ # Hiding the +service_url+ behind a redirect also gives you the power to change services without updating all URLs. And
+ # it allows permanent URLs that redirect to the +service_url+ to be cached in the view.
#
# Use `url_for(variant)` (or the implied form, like `link_to variant` or `redirect_to variant`) to get the stable URL
- # for a variant that points to the `ActiveStorage::VariantsController`, which in turn will use this `#service_call` method
+ # for a variant that points to the ActiveStorage::VariantsController, which in turn will use this +#service_call+ method
# for its redirection.
def service_url(expires_in: 5.minutes, disposition: :inline)
service.url key, expires_in: expires_in, disposition: disposition, filename: blob.filename, content_type: blob.content_type