aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-21 11:19:12 -0800
committerJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-21 11:19:12 -0800
commit0f93bccd8a3824a2c85f4625db688ea59eee26de (patch)
tree4faca4ec48d7d1e81354c4a3946d686c35fd80c2 /activestorage
parent7fb7679e17543b015d92dc9367d9ea382c40e825 (diff)
parent3fa812615a28f9c6392c433f3b08c41c5efb999f (diff)
downloadrails-0f93bccd8a3824a2c85f4625db688ea59eee26de.tar.gz
rails-0f93bccd8a3824a2c85f4625db688ea59eee26de.tar.bz2
rails-0f93bccd8a3824a2c85f4625db688ea59eee26de.zip
Merge branch 'master' into activestorage-guide
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/config/routes.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/activestorage/config/routes.rb b/activestorage/config/routes.rb
index c659e079fd..1eae21445a 100644
--- a/activestorage/config/routes.rb
+++ b/activestorage/config/routes.rb
@@ -3,38 +3,38 @@
Rails.application.routes.draw do
get "/rails/active_storage/blobs/:signed_id/*filename" => "active_storage/blobs#show", as: :rails_service_blob, internal: true
- direct :rails_blob do |blob|
- route_for(:rails_service_blob, blob.signed_id, blob.filename)
+ direct :rails_blob do |blob, options|
+ route_for(:rails_service_blob, blob.signed_id, blob.filename, options)
end
- resolve("ActiveStorage::Blob") { |blob| route_for(:rails_blob, blob) }
- resolve("ActiveStorage::Attachment") { |attachment| route_for(:rails_blob, attachment.blob) }
+ resolve("ActiveStorage::Blob") { |blob, options| route_for(:rails_blob, blob) }
+ resolve("ActiveStorage::Attachment") { |attachment, options| route_for(:rails_blob, attachment.blob, options) }
get "/rails/active_storage/variants/:signed_blob_id/:variation_key/*filename" => "active_storage/variants#show", as: :rails_blob_variation, internal: true
- direct :rails_variant do |variant|
+ direct :rails_variant do |variant, options|
signed_blob_id = variant.blob.signed_id
variation_key = variant.variation.key
filename = variant.blob.filename
- route_for(:rails_blob_variation, signed_blob_id, variation_key, filename)
+ route_for(:rails_blob_variation, signed_blob_id, variation_key, filename, options)
end
- resolve("ActiveStorage::Variant") { |variant| route_for(:rails_variant, variant) }
+ resolve("ActiveStorage::Variant") { |variant, options| route_for(:rails_variant, variant, options) }
get "/rails/active_storage/previews/:signed_blob_id/:variation_key/*filename" => "active_storage/previews#show", as: :rails_blob_preview, internal: true
- direct :rails_preview do |preview|
+ direct :rails_preview do |preview, options|
signed_blob_id = preview.blob.signed_id
variation_key = preview.variation.key
filename = preview.blob.filename
- route_for(:rails_blob_preview, signed_blob_id, variation_key, filename)
+ route_for(:rails_blob_preview, signed_blob_id, variation_key, filename, options)
end
- resolve("ActiveStorage::Preview") { |preview| route_for(:rails_preview, preview) }
+ resolve("ActiveStorage::Preview") { |preview, options| route_for(:rails_preview, preview, options) }
get "/rails/active_storage/disk/:encoded_key/*filename" => "active_storage/disk#show", as: :rails_disk_service, internal: true