From b7f4c5b6ac5cd3da3cbf52d051b9d1c8afa8f0cc Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sat, 24 Feb 2024 15:05:26 -0800 Subject: [PATCH] Remove asset_hosts initializer It just contains one constant, used in one place. Inlined and deleted! --- app/models/swf_asset.rb | 6 +++--- config/initializers/asset_hosts.rb | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 config/initializers/asset_hosts.rb diff --git a/app/models/swf_asset.rb b/app/models/swf_asset.rb index 7a88a55b..1ead13ba 100644 --- a/app/models/swf_asset.rb +++ b/app/models/swf_asset.rb @@ -45,11 +45,11 @@ class SwfAsset < ApplicationRecord end def image_url(size=IMAGE_SIZES[:large]) - host = ASSET_HOSTS[:swf_asset_images] size_key = size.join('x') - image_dir = "#{self['type']}/#{partition_path}#{self.remote_id}" - "https://#{host}/#{image_dir}/#{size_key}.png?#{image_version}" + + "https://impress-asset-images.openneo.net/#{image_dir}/#{size_key}.png?" + + "#{image_version}" end def images diff --git a/config/initializers/asset_hosts.rb b/config/initializers/asset_hosts.rb deleted file mode 100644 index 287f1ef6..00000000 --- a/config/initializers/asset_hosts.rb +++ /dev/null @@ -1,3 +0,0 @@ -ASSET_HOSTS = { - :swf_asset_images => 'impress-asset-images.openneo.net' -}