Skip to content

Commit 0650f8e

Browse files
committed
fix rubocop prefers inline if
1 parent 67c8237 commit 0650f8e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

config/initializers/active_storage_foodcoop_path.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ def generate_url(key, expires_in:, filename:, content_type:, disposition:)
3838
purpose: :blob_key
3939
)
4040

41-
if url_options.blank?
42-
raise ArgumentError, "Cannot generate URL for #{filename} using Disk service, please set ActiveStorage::Current.url_options."
43-
end
41+
raise ArgumentError, "Cannot generate URL for #{filename} using Disk service, please set ActiveStorage::Current.url_options." if url_options.blank?
4442

4543
url_helpers.rails_disk_service_url(verified_key_with_expiration, filename: filename, **url_options)
4644
end

0 commit comments

Comments
 (0)