diff options
author | George Claghorn <george@basecamp.com> | 2019-03-31 07:46:18 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2019-03-31 07:46:18 -0400 |
commit | 002684e36e813469c3585e193f0698784c88278b (patch) | |
tree | 1c916600c4fb69445fe382d7a115627a2456386a /activestorage/app | |
parent | 51ab5cb0432c483422112ebbb274855a3fa5ecc8 (diff) | |
download | rails-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.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 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 |