Im trying to update a parameter in a collection of objects using Rails, CouchRest.
This is what im doing currently,
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
Whenever update_attributes failed for a User object i want the entire transaction to be rolled back. How can i achieve this?
Am Using CouchDB. Rails, CouchRest and Not using ActiveRecord.