You can clone with
HTTPS or Subversion.
I am using couchrest model (rails project), and i want to access attributes like this:
person = Person.get(some_id)
person["name"] = "joe"
and i don't want to define "name" as a property in the Person model. the problem is that the update doesn't work (the document is not updated in couchdb), since the document is not dirty.
the reason, i think, that the document doesn't get dirty when i use the = method is because it doesn't go via the write_attribute method that uses the Dirty mechanism, but it goes via the = method in CouchRest::Attributes module
one solution is to do:
person.disable_dirty = true # but that seems dirty.
another solution is to do something like that:
but that's even dirtier, especially if "name" reside in a variable, it will look something like that:
is there a less dirty idea/solution re this issue?
same prob for me here
first of all, you need mass_assign_any_attribute, see http://www.couchrest.info/model/configuring.html#mass_assign
class Person < CouchRest::Model::Base
then there is an issue with updating, see #114. there is a workaround.