From 002684e36e813469c3585e193f0698784c88278b Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Sun, 31 Mar 2019 07:46:18 -0400 Subject: 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. --- activestorage/app/models/active_storage/blob.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activestorage/app/models') 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 -- cgit v1.2.3