aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app
diff options
context:
space:
mode:
authorJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-20 17:01:27 -0800
committerJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-20 17:01:27 -0800
commitc73001f4b7b5aae12a64be0c827c14739c0ba124 (patch)
tree2fff88211b4b88105ac0a78f549d5ca4d46246e1 /activestorage/app
parent686b3466bab78ca69eaab98d76cc489d84d5eb62 (diff)
parent1d24e47140356f136471d15e3ce3fa427f4430c2 (diff)
downloadrails-c73001f4b7b5aae12a64be0c827c14739c0ba124.tar.gz
rails-c73001f4b7b5aae12a64be0c827c14739c0ba124.tar.bz2
rails-c73001f4b7b5aae12a64be0c827c14739c0ba124.zip
Merge branch 'master' into activestorage-guide
Diffstat (limited to 'activestorage/app')
-rw-r--r--activestorage/app/controllers/active_storage/disk_controller.rb2
-rw-r--r--activestorage/app/models/active_storage/blob.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/activestorage/app/controllers/active_storage/disk_controller.rb b/activestorage/app/controllers/active_storage/disk_controller.rb
index a4fd427cb2..8caecfff49 100644
--- a/activestorage/app/controllers/active_storage/disk_controller.rb
+++ b/activestorage/app/controllers/active_storage/disk_controller.rb
@@ -5,6 +5,8 @@
# Always go through the BlobsController, or your own authenticated controller, rather than directly
# to the service url.
class ActiveStorage::DiskController < ActionController::Base
+ skip_forgery_protection
+
def show
if key = decode_verified_key
send_data disk_service.download(key),
diff --git a/activestorage/app/models/active_storage/blob.rb b/activestorage/app/models/active_storage/blob.rb
index 99823e14c6..2aa05d665e 100644
--- a/activestorage/app/models/active_storage/blob.rb
+++ b/activestorage/app/models/active_storage/blob.rb
@@ -249,7 +249,7 @@ class ActiveStorage::Blob < ActiveRecord::Base
# You won't ordinarily need to call this method from a Rails application. New blobs are automatically and asynchronously
# analyzed via #analyze_later when they're attached for the first time.
def analyze
- update! metadata: extract_metadata_via_analyzer
+ update! metadata: metadata.merge(extract_metadata_via_analyzer)
end
# Enqueues an ActiveStorage::AnalyzeJob which calls #analyze.