aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/controllers/active_storage/disk_controller.rb
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2017-08-20 18:09:44 -0400
committerGeorge Claghorn <george.claghorn@gmail.com>2017-08-20 18:09:44 -0400
commit376dd5c0011214309d984c9a1e98958e2bc46c48 (patch)
treeb997a3eadb8760d1fbd35efa4c2308adef08185c /activestorage/app/controllers/active_storage/disk_controller.rb
parent8bd14971b908b7d3c7b41a715d2904df88ee7b3c (diff)
downloadrails-376dd5c0011214309d984c9a1e98958e2bc46c48.tar.gz
rails-376dd5c0011214309d984c9a1e98958e2bc46c48.tar.bz2
rails-376dd5c0011214309d984c9a1e98958e2bc46c48.zip
DRY
Diffstat (limited to 'activestorage/app/controllers/active_storage/disk_controller.rb')
-rw-r--r--activestorage/app/controllers/active_storage/disk_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activestorage/app/controllers/active_storage/disk_controller.rb b/activestorage/app/controllers/active_storage/disk_controller.rb
index b10d4e2cac..41e6d61bff 100644
--- a/activestorage/app/controllers/active_storage/disk_controller.rb
+++ b/activestorage/app/controllers/active_storage/disk_controller.rb
@@ -8,7 +8,7 @@ class ActiveStorage::DiskController < ActionController::Base
def show
if key = decode_verified_key
send_data disk_service.download(key),
- filename: params[:filename], disposition: disposition_param, content_type: params[:content_type]
+ disposition: disposition_param, content_type: params[:content_type]
else
head :not_found
end
@@ -39,7 +39,7 @@ class ActiveStorage::DiskController < ActionController::Base
end
def disposition_param
- params[:disposition].presence_in(%w( inline attachment )) || "inline"
+ params[:disposition].presence || "inline"
end