2013-04-10 82 views
0

当我将新代码推送到Openshift时,如何配置模型以避免在资产重新编译时删除其资产?openshift删除资产

此刻我的模型是这样的:

class Slide < ActiveRecord::Base 
    attr_accessible :caption, :position, :visible, :photo 
    has_attached_file :photo, :styles => { :thumb => "190x90>" } 
    ... 

我已经注意到了,上传的照片是从/ public目录时Openshift在推新代码重新编译我的资产删除。

我已经发现了一些旧的代码看起来像这样:

has_attached_file :attachment, :removable => true, 
    :url => "/attachments/:id/:style/:basename.:extension", 
    :path => ":rails_root/tmp/attachments/:id/:style/:basename.:extension" 

我应该尝试在上面的代码片段类似,或者是有改变它在Openshift配置的选项?

回答