2013-04-10 26 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配置的選項?

回答

相關問題