Closed morgangrubb closed 1 year ago
Based on 1.6.2 since the json-as-string 2.x versions break our application.
LGTM, could you please take a look at that rubocop issue? Also, this is not gonna be a breaking change, right?
Absolutely, I'll get that done today.
As for it being a breaking change, I don't think it can be? No functionality is added to the ActiveRecord model unless you include StoreModel::NestedAttributes
(I debated doing that automatically but figured we're probably better off making it a deliberate thing) and the change to the attribute getter/setter detection from Types::Many
to Types::ManyBase
is just so that Many
and ManyPolymorphic
are both handled.
Other than those changes, everything is exactly as it was in 1.6.2 so I think it's pretty safe.
The other thing I am debating doing is supporting reject_if
as per Rails accepts_nested_attributes_for
.
Any chance we could get this released as 1.6.3 while waiting for the stringified json in 2.x to get resolved?
This makes it possible to use the complete Rails pathway for nested form objects.
Also updates
accepts_nested_attributes_for
to allow the Rails-syntax.This will allow the form builders to work their magic:
Resulting in:
In the controller: