You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the hash["#{record_name}_attributes"] is simply an empty array. I assume this is intentional - but it also means that in our form (which by the way could be an issue in our form since we are not dealing with strictly ActiveRecord objects), blah_attributes will still get rejected because the array is empty.
In our form we have to manually call add_signed_fields with :blah_attributes => [:a, :b, :c] to get them accepted.
Is this by design? Any thoughts?
The text was updated successfully, but these errors were encountered:
After further debugging, I nailed it down to being an issue caused by simple_fields_for. If I use fields_for, everything works, but using simple_fields_for doesn't. SignedForm::FormBuilder doesn't get initialised so the FIELDS_TO_SIGN loop never gets triggered for the nested fields.
The issue on #17 that I am finding is that signed_form doesn't allow for the override of the scalar value. If you are using non AR values (hashes, arrays, etc) signed_form will mark the fields as strings, but arrays can get sent in (and rejected).
Hi,
I noticed the following code snippet in
lib/signed_form/form_builder
:It seems the
hash["#{record_name}_attributes"]
is simply an empty array. I assume this is intentional - but it also means that in our form (which by the way could be an issue in our form since we are not dealing with strictly ActiveRecord objects),blah_attributes
will still get rejected because the array is empty.In our form we have to manually call
add_signed_fields
with:blah_attributes => [:a, :b, :c]
to get them accepted.Is this by design? Any thoughts?
The text was updated successfully, but these errors were encountered: