96037069ff
Before, when autosaving a draft, removing a repetition row would send `_destroy` inputs to the controller – but not remove the row from the DOM. This led to the `_destroy` inputs being sent again on the next autosave request, which made the controller raise (because the row fields were already deleted before). To fix this, we let the controller response remove the deleted row(s) from the DOM. Doing it using a controller response avoids the need to keep track of operations on the Javascript side: the controller can easily know which row was just deleted, and emit the relevant changes for the DOM. This keeps the autosave requests robust: even if a request is skipped (e.g. because of a network interruption), the next request will still contain the relevant informations to succeed, and not let the form in an unstable state. Fix #5470 |
||
---|---|---|
.. | ||
admin | ||
administrateurs | ||
administrations | ||
api | ||
champs | ||
concerns | ||
devise | ||
france_connect | ||
instructeurs | ||
manager | ||
new_administrateur | ||
users | ||
admin_controller.rb | ||
api_controller.rb | ||
api_geo_test_controller.rb | ||
application_controller.rb | ||
attachments_controller.rb | ||
demandes_controller.rb | ||
invites_controller.rb | ||
ping_controller.rb | ||
root_controller.rb | ||
stats_controller.rb | ||
support_controller.rb | ||
webhook_controller.rb |