aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2019-03-31 07:46:18 -0400
committerGeorge Claghorn <george@basecamp.com>2019-03-31 07:46:18 -0400
commit002684e36e813469c3585e193f0698784c88278b (patch)
tree1c916600c4fb69445fe382d7a115627a2456386a /activestorage/app
parent51ab5cb0432c483422112ebbb274855a3fa5ecc8 (diff)
downloadrails-002684e36e813469c3585e193f0698784c88278b.tar.gz
rails-002684e36e813469c3585e193f0698784c88278b.tar.bz2
rails-002684e36e813469c3585e193f0698784c88278b.zip
Add ActiveStorage.service_configurations and ActiveStorage.service
* Allow plugins to access the global service and alternative service configs before ActiveStorage::Blob loads. * Make ActiveStorage.service_configurations the default second argument to ActiveStorage::Service.configure. Plugins that just want to use an alternative service defined in config/storage.yml needn't pass in the config themselves.
Diffstat (limited to 'activestorage/app')
-rw-r--r--activestorage/app/models/active_storage/blob.rb2
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 c9fbafad1f..4da1605448 100644
--- a/activestorage/app/models/active_storage/blob.rb
+++ b/activestorage/app/models/active_storage/blob.rb
@@ -29,7 +29,7 @@ class ActiveStorage::Blob < ActiveRecord::Base
has_secure_token :key
store :metadata, accessors: [ :analyzed, :identified ], coder: ActiveRecord::Coders::JSON
- class_attribute :service
+ class_attribute :service, default: ActiveStorage.service
has_many :attachments