From c3277d53c892876621af162cd4b2d5e3b0ff5731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= Date: Fri, 1 Sep 2017 13:07:13 +0200 Subject: [PATCH] Change direct uploads path --- app/models/document.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/document.rb b/app/models/document.rb index 8e21b8888..7fd82ea33 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -1,7 +1,7 @@ class Document < ActiveRecord::Base include DocumentsHelper include DocumentablesHelper - has_attached_file :attachment, path: ":rails_root/public/system/:class/:attachment/:prefix/:style/:filename" + has_attached_file :attachment, path: ":rails_root/public/system/:class/:prefix/:style/:filename" attr_accessor :cached_attachment belongs_to :user @@ -44,7 +44,7 @@ class Document < ActiveRecord::Base if !attachment.instance.persisted? "cached_attachments/user/#{attachment.instance.user_id}" else - Paperclip::Interpolations.id_partition(attachment, style) + ":attachment/:id_partition" end end