我有一个 model,名为 CustomSearchEngine
命令行下:
irb(main):044:0> cse=CustomSearchEngine.last
返回实例,这没问题:
=> #<CustomSearchEngine _id: 50a1fc222061c78416000001, _type: nil, created_at: 2
012-11-13 07:52:59 UTC, updated_at: 2012-11-13 07:57:14 UTC, parent_id: nil, sta
tus: "draft", author_id: "50a047742061c77019000076", consumer_ids: [], node_id:
"508a3fee2061c76825000001">
注意 status:"draft" 然后,我执行 cse.update(status:"publish") 后,返回:
irb(main):045:0> cse.update(status:"publish")
=> true
irb(main):046:0> cse
=> #<CustomSearchEngine _id: 50a1fc222061c78416000001, _type: nil, created_at: 2
012-11-13 07:52:59 UTC, updated_at: 2012-11-13 07:57:14 UTC, parent_id: nil, sta
tus: "draft", author_id: "50a047742061c77019000076", consumer_ids: [], node_id:
"508a3fee2061c76825000001">
update 结果执行为 true,但是 status 还是 draft,这是何故?