我有一个与CouchRest和太阳黑子整合的问题。当我搜索书的细节时,太阳黑子的结果是空的。我试着谷歌很长一段时间,但没有帮助。 Started GET "/books/search?utf8=%E2%9C%93&query=Book of Life&commit=Search%21" for 127.0.0.1 at 2011-09-08 11:27:41 +0700
Processing b
在我的课上,我想包含多个模块。每个模块可以 定义自己的属性,以坚持在couchDB。 下面是一个例子: module Owner
property :name
end
module Animal
property :type
end
class Cat
include Owner
include Animal
end
这是行不通的。我得到这个错误:“未定义的方法`属性'”
鉴于此代码: class House < CouchRest::Model::Base
use_database DB
property :somedumfield, :type => Integer
end
我可以输入数字或文本数据;它将它保存到数据库中,不会引发错误;我正在使用沙发模型(使用couchrest),我如何在字段上添加数据类型的验证。 在此先感谢
使用CouchDB(couchrest_model)作为文档数据库,我有一个正常的Rails项目(没有活动记录)。 我没有设置RSpec和一个基本的脚手架'项目'。 当我测试了以下规格: before(:each) do
@project = Project.create! valid_attributes
end
describe "GET index" do