Closed greywolvez closed 7 years ago
This happens when I tried to build a fresh object from a cached copy. The copy has fields already defined. This may not be the intended use at this time.
I am new to this and I can see that the in the changedfields() function you are checking this.klass.fields() but I can not figure out how to actually assign the fields. Do you have a working example of what that might look like?
Hi,
You can define specific properties you want to track like so:
class Resource extends MyLibrary.Base
# Track changes to instance.property1 and instance.property2
this.attributes('property1', 'property2')
# Relationships automatically are tracked
this.hasMany('orders')
I've been meaning to document this, 0.9.4 was just released
The following line prevents patching from detecting the correct changes.
https://github.com/nicklandgrebe/activeresource.js/blob/master/dist/active-resource.js#L1139
The
!
should be deleted for the field to be generated correctly,