Skip to content

Commit 69ede95

Browse files
Use public/system for Paperclip except in production
1 parent 306a5f3 commit 69ede95

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

config/initializers/paperclip.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# frozen_string_literal: true
22

33
Paperclip::Attachment.default_options[:url] = ":s3_domain_url"
4-
if Rails.env == "test" || ENV["CI"]
4+
if Rails.env == "production"
55
Paperclip::Attachment.default_options[:path] =
6-
":rails_root/public/system/:class/:attachment/:id_partition/:style/:filename"
6+
"/:class/:attachment/:id_partition/:style/:filename"
77
else
88
Paperclip::Attachment.default_options[:path] =
9-
"/:class/:attachment/:id_partition/:style/:filename"
9+
":rails_root/public/system/:class/:attachment/:id_partition/:style/:filename"
1010
end
1111

1212
module Paperclip

0 commit comments

Comments
 (0)