1
我在使用CouchPotato找到有關如何從CouchDB中刪除文檔的文檔時遇到問題。由於我知道我必須設置屬性_deleted = true
。當我想要得到的是不被刪除的文件,我已經嘗試將條件添加到我的課是這樣的:如何使用CouchPotato從CouchDB中刪除文檔?
view :item, :key => [:userid, :date], :conditions => 'doc._deleted === nil'
但它不工作。有人能指引我朝着正確的方向嗎?
它看起來像一個文件可以與destroy_document被移除: @comment = Comment.new:標題=> '標題'; CouchPotato.database.save_document! @評論; @comment_id = @ comment.id; CouchPotato.database.destroy_document @comment; – Fossmo 2010-09-12 19:55:02