instance method
url
Ruby on Rails 7.2.3
Since v6.1.7.10Signature
url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline)
Returns the URL of the blob variant on the service. See {ActiveStorage::Blob#url} for details.
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::RepresentationsController, which in turn will use this service_call method for its redirection.
Parameters
-
expires_inkey = ActiveStorage.service_urls_expire_in -
dispositionkey = :inline
Source
# File activestorage/app/models/active_storage/variant.rb, line 82
def url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline)
service.url key, expires_in: expires_in, disposition: disposition, filename: filename, content_type: content_type
end
Defined in activestorage/app/models/active_storage/variant.rb line 82
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Variant