From 6d0ed8c8f86f511bb599c1d3831dbfb0503b0e09 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sat, 13 Feb 2021 22:16:37 +0100 Subject: [PATCH] Adding prefix /shrine for static images Otherwise /screenshot/:name might get confused with /screenshot/simage/123/small-123.png --- config/initializers/shrine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/shrine.rb b/config/initializers/shrine.rb index b202d61..da784f7 100644 --- a/config/initializers/shrine.rb +++ b/config/initializers/shrine.rb @@ -7,7 +7,7 @@ require "shrine/storage/file_system" Shrine.storages = { # Saves to ./public/screenshot/ID/image/… cache: Shrine::Storage::FileSystem.new("public", prefix: "cache"), - store: Shrine::Storage::FileSystem.new("public", prefix: "/"), + store: Shrine::Storage::FileSystem.new("public", prefix: "shrine"), } # See plugin documentation at https://shrinerb.com/docs/plugins/activerecord