From c520417ad1bb4b2630e39625332a5565e119a42b Mon Sep 17 00:00:00 2001 From: dixpac Date: Sun, 8 Apr 2018 13:56:41 +0200 Subject: Fix leftover references to VariantsController [ci skip] VariantsController has been merged to RepresentationsController, this PR fixes outdated references to VariantsController in ActiveStorage documentation. --- activestorage/app/models/active_storage/blob/representable.rb | 2 +- activestorage/app/models/active_storage/variant.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'activestorage/app') diff --git a/activestorage/app/models/active_storage/blob/representable.rb b/activestorage/app/models/active_storage/blob/representable.rb index 88fc25b7ae..fea62e62de 100644 --- a/activestorage/app/models/active_storage/blob/representable.rb +++ b/activestorage/app/models/active_storage/blob/representable.rb @@ -20,7 +20,7 @@ module ActiveStorage::Blob::Representable # # <%= image_tag 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::RepresentationsController # can then produce on-demand. # # Raises ActiveStorage::InvariableError if ImageMagick cannot transform the blob. To determine whether a blob is diff --git a/activestorage/app/models/active_storage/variant.rb b/activestorage/app/models/active_storage/variant.rb index a95a4bfd7c..d84208419c 100644 --- a/activestorage/app/models/active_storage/variant.rb +++ b/activestorage/app/models/active_storage/variant.rb @@ -13,14 +13,14 @@ require "active_storage/downloading" # 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::RepresentationsController. # # 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 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::RepresentationsController # can then produce on-demand. # # When you do want to actually produce the variant needed, call +processed+. This will check that the variant @@ -65,7 +65,7 @@ class ActiveStorage::Variant # 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::RepresentationsController, which in turn will use this +service_call+ method # for its redirection. def service_url(expires_in: service.url_expires_in, disposition: :inline) service.url key, expires_in: expires_in, disposition: disposition, filename: filename, content_type: content_type -- cgit v1.2.3