Using the "images_path_prefix" configuration variable in the Package model

This commit is contained in:
Christoph Haas 2013-11-20 21:21:16 +01:00
parent f9f4c8d981
commit a7e05b2b78

View file

@ -6,6 +6,6 @@ class Screenshot < ActiveRecord::Base
}
def image_url(size)
"/screenshots/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png"
"#{Rails.configuration.images_path_prefix}/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png"
end
end