0
我试图使用Rails,CouchRest更新对象集合中的参数。使用CouchRest更新对象数组,Rails
这是即时通讯做目前,
class User
property :country
property :some_flag
end
@users = User.by_country(:key => 'country-name')
@users.each do |user|
user.update_attributes({:some_flag => 'true'})
end
每当update_attributes方法失败User对象,我想整个事务回滚。我怎样才能做到这一点?
正在使用CouchDB。 Rails,CouchRest和不是使用ActiveRecord。