diff --git a/app/models/post/image_store/local_flat.rb b/app/models/post/image_store/local_flat.rb index 5fc77945..d05a6de4 100644 --- a/app/models/post/image_store/local_flat.rb +++ b/app/models/post/image_store/local_flat.rb @@ -26,7 +26,7 @@ module PostImageStoreMethods def preview_url if status == "deleted" - "#{Rails.root}/public/deleted-preview.png" + CONFIG['url_base'] + "/public/deleted-preview.png" elsif image? CONFIG["url_base"] + "/data/preview/#{md5}.jpg" else diff --git a/app/models/post/image_store/local_flat_with_amazon_s3_backup.rb b/app/models/post/image_store/local_flat_with_amazon_s3_backup.rb index 55a8106f..68ec0f8b 100644 --- a/app/models/post/image_store/local_flat_with_amazon_s3_backup.rb +++ b/app/models/post/image_store/local_flat_with_amazon_s3_backup.rb @@ -70,7 +70,7 @@ module PostImageStoreMethods # end if status == "deleted" - "#{Rails.root}/public/deleted-preview.png" + CONFIG['url_base'] + "/public/deleted-preview.png" elsif self.image? CONFIG["url_base"] + "/data/preview/#{md5}.jpg" else diff --git a/app/models/post/image_store/local_hierarchy.rb b/app/models/post/image_store/local_hierarchy.rb index a5adb004..99cc37ae 100644 --- a/app/models/post/image_store/local_hierarchy.rb +++ b/app/models/post/image_store/local_hierarchy.rb @@ -30,7 +30,7 @@ module PostImageStoreMethods def preview_url if status == "deleted" - "#{Rails.root}/public/deleted-preview.png" + CONFIG['url_base'] + "/public/deleted-preview.png" elsif image? CONFIG["url_base"] + "/data/preview/#{file_hierarchy}/#{md5}.jpg" else