aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib/active_storage/service
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/lib/active_storage/service')
-rw-r--r--activestorage/lib/active_storage/service/gcs_service.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activestorage/lib/active_storage/service/gcs_service.rb b/activestorage/lib/active_storage/service/gcs_service.rb
index a0ba5654a1..685dd61a0a 100644
--- a/activestorage/lib/active_storage/service/gcs_service.rb
+++ b/activestorage/lib/active_storage/service/gcs_service.rb
@@ -36,7 +36,7 @@ module ActiveStorage
def delete(key)
instrument :delete, key do
begin
- file_for(key).try(:delete)
+ file_for(key).delete
rescue Google::Cloud::NotFoundError
# Ignore files already deleted
end
@@ -45,7 +45,7 @@ module ActiveStorage
def exist?(key)
instrument :exist, key do |payload|
- answer = file_for(key).present?
+ answer = file_for(key).exists?
payload[:exist] = answer
answer
end
@@ -81,7 +81,7 @@ module ActiveStorage
private
def file_for(key)
- bucket.file(key)
+ bucket.file(key, skip_lookup: true)
end
end
end