aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib/active_storage/service.rb
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2017-12-02 22:43:28 -0500
committerGitHub <noreply@github.com>2017-12-02 22:43:28 -0500
commit8c5a7fbefd3cad403e7594d0b6a5488d80d4c98e (patch)
tree837dc872b3769a9ec4e08096c0ef2847288f64ba /activestorage/lib/active_storage/service.rb
parentb23e381c89aa91451d73d3a1b1b6e4cbe7bc7780 (diff)
downloadrails-8c5a7fbefd3cad403e7594d0b6a5488d80d4c98e.tar.gz
rails-8c5a7fbefd3cad403e7594d0b6a5488d80d4c98e.tar.bz2
rails-8c5a7fbefd3cad403e7594d0b6a5488d80d4c98e.zip
Purge variants with their blobs
Diffstat (limited to 'activestorage/lib/active_storage/service.rb')
-rw-r--r--activestorage/lib/active_storage/service.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/activestorage/lib/active_storage/service.rb b/activestorage/lib/active_storage/service.rb
index aa150e4d8a..c8f675db86 100644
--- a/activestorage/lib/active_storage/service.rb
+++ b/activestorage/lib/active_storage/service.rb
@@ -78,6 +78,11 @@ module ActiveStorage
raise NotImplementedError
end
+ # Delete files at keys starting with the +prefix+.
+ def delete_prefixed(prefix)
+ raise NotImplementedError
+ end
+
# Return +true+ if a file exists at the +key+.
def exist?(key)
raise NotImplementedError
@@ -104,10 +109,10 @@ module ActiveStorage
end
private
- def instrument(operation, key, payload = {}, &block)
+ def instrument(operation, payload = {}, &block)
ActiveSupport::Notifications.instrument(
"service_#{operation}.active_storage",
- payload.merge(key: key, service: service_name), &block)
+ payload.merge(service: service_name), &block)
end
def service_name