Skip to content

Commit

Permalink
fix rubocop prefers inline if
Browse files Browse the repository at this point in the history
  • Loading branch information
yksflip committed Mar 6, 2024
1 parent 67c8237 commit 0650f8e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions config/initializers/active_storage_foodcoop_path.rb
Expand Up @@ -38,9 +38,7 @@ def generate_url(key, expires_in:, filename:, content_type:, disposition:)
purpose: :blob_key
)

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

url_helpers.rails_disk_service_url(verified_key_with_expiration, filename: filename, **url_options)
end
Expand Down

0 comments on commit 0650f8e

Please sign in to comment.