diff options
author | George Claghorn <george.claghorn@gmail.com> | 2017-08-20 18:09:44 -0400 |
---|---|---|
committer | George Claghorn <george.claghorn@gmail.com> | 2017-08-20 18:09:44 -0400 |
commit | 376dd5c0011214309d984c9a1e98958e2bc46c48 (patch) | |
tree | b997a3eadb8760d1fbd35efa4c2308adef08185c /activestorage/app/models/active_storage | |
parent | 8bd14971b908b7d3c7b41a715d2904df88ee7b3c (diff) | |
download | rails-376dd5c0011214309d984c9a1e98958e2bc46c48.tar.gz rails-376dd5c0011214309d984c9a1e98958e2bc46c48.tar.bz2 rails-376dd5c0011214309d984c9a1e98958e2bc46c48.zip |
DRY
Diffstat (limited to 'activestorage/app/models/active_storage')
-rw-r--r-- | activestorage/app/models/active_storage/blob.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/models/active_storage/blob.rb b/activestorage/app/models/active_storage/blob.rb index 9f2ed1e5ac..2e627ef118 100644 --- a/activestorage/app/models/active_storage/blob.rb +++ b/activestorage/app/models/active_storage/blob.rb @@ -127,7 +127,7 @@ class ActiveStorage::Blob < ActiveRecord::Base # 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. def service_url(expires_in: 5.minutes, disposition: :inline) - service.url key, expires_in: expires_in, disposition: disposition, filename: filename, content_type: content_type + service.url key, expires_in: expires_in, disposition: "#{disposition}; filename=\"#{filename}\"", filename: filename, content_type: content_type end # Returns a URL that can be used to directly upload a file for this blob on the service. This URL is intended to be |