1
0
Fork 0
forked from OpenNeo/impress

Remove asset_hosts initializer

It just contains one constant, used in one place. Inlined and deleted!
This commit is contained in:
Emi Matchu 2024-02-24 15:05:26 -08:00
parent 6a4f2b91c1
commit b7f4c5b6ac
2 changed files with 3 additions and 6 deletions

View file

@ -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

View file

@ -1,3 +0,0 @@
ASSET_HOSTS = {
:swf_asset_images => 'impress-asset-images.openneo.net'
}