回形针配置|旧附件 [英] Paperclip configurations | Old Attachments
本文介绍了回形针配置|旧附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近更改了回形针配置:
I recently changed my Paperclip configurations:
新配置:
has_attached_file :scr, :styles => { :index => "215x165#", :show => "900" },
processors: [:thumbnail, :compression],
:content_type => { :content_type => ["image/jpg", "image/png"] }
旧配置:
has_attached_file :scr, :styles => { :index => "215x165#
为了在我的应用程序上显示我需要的图片,我使用 :show
属性。
For Showing the Pictures i need on my App i use the :show
attribute.
问题是我的应用程序已经有很多图片,并且在更改配置后图片不再可见(因为上传时会进行裁剪和配置)。
The Problem is that my app has already a lot of pictures and upon changing the configs the pictures are not longer visible (Cause the cropping and configuration is done when uploading).
是否可以重新保存这些图片?
Is there a way to Re-Save those Pictures ?
我尝试了
Screen.find_each(&:save)
在其中筛选图片,但是没有用。
where "Screen" the pictures, but it didn't work.
我缺少什么?
推荐答案
尝试运行 rake paperclip:refresh CLASS = Screen
这篇关于回形针配置|旧附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文