Open lastobelus opened 7 years ago
oh, spec as written requires attr_extras
, and cattr_accessor
from ActiveSupport
I'm kinda desperate for a workaround for this short of ignoring Reform#save and rewriting save logic for the whole object graph myself. Is there perhaps a way to customize the Twin
objects used behind the scenes to only save when some property is true?
Complete Description of Issue
When you save (or sync) a form that has a collection, and that collection specifies a form object
ItemForm
, andItemForm
overridessave
orsync
methods, those methods are never called.Do you think that for consistency/control that when saving/sync'ing the tree that all the Form wrappers'
save/sync
methods should be called, not just that of the root object?I mentioned on gitter that I thought this was only with non-virtual collections, but it seems I misrembered and it is with any collection.
Steps to reproduce
Expected behavior
I'd expect the specs to pass and print the following:
Actual behavior
specs fail, and following is printed:
System configuration
Reform version: 2.3.0.rc1
Full Backtrace of Exception (if any)