demarches-normaliennes/app/controllers
Pierre de La Morinerie 96037069ff autosave: remove the repetition row after deletion
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
2020-08-25 14:39:34 +02:00
..
admin - tranferred controllers from admin to mew_administrateur 2020-07-29 12:26:27 +02:00
administrateurs fix error message during admin activation error 2020-03-05 12:01:16 +00:00
administrations layouts: rename "application" to "application_old" 2019-01-07 12:17:05 +01:00
api [GraphQL] Add more filters to dossiers 2019-11-07 22:07:42 +01:00
champs controllers: disable explicit purge of invalid file 2020-07-07 18:03:56 +02:00
concerns update dossier after saving avis 2020-07-30 10:18:44 +02:00
devise sign_in: extract the procedure context to a ProcedureContextConcern 2019-01-17 11:07:09 +01:00
france_connect Rename gestionnaire in code to instructeur 2019-08-12 13:47:01 +02:00
instructeurs Merge pull request #5424 from betagouv/new_design_edit_attestation 2020-07-31 11:18:22 +02:00
manager unique emails + remove n+1 2020-05-18 12:46:42 +00:00
new_administrateur Adapt configuration email view to the new UI 2020-08-06 16:56:24 +02:00
users autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00
admin_controller.rb Remove “avec_lien” helpers now that Procedure.path cannot be nil 2019-09-17 16:30:48 +02:00
api_controller.rb Enable flipflop on api requests 2019-03-12 14:02:55 +01:00
api_geo_test_controller.rb Revert "Revert "Merge pull request #4552 from tchak/champ-communes"" 2020-01-14 18:46:07 +01:00
application_controller.rb controllers: rename pundit_user to current_account 2020-06-24 15:42:30 +02:00
attachments_controller.rb attachments: remove the buggy fallback 2020-04-09 10:40:08 +02:00
demandes_controller.rb layouts: rename "application" to "application_old" 2019-01-07 12:17:05 +01:00
invites_controller.rb user: revoque un invité sur un dossier 2020-07-14 18:25:31 +02:00
ping_controller.rb add maintenance mode 2020-06-22 11:17:22 +02:00
root_controller.rb ajout du nom d'application dans les mailers 2020-07-23 16:17:52 +02:00
stats_controller.rb update stats with traitement model 2020-07-08 18:15:15 +02:00
support_controller.rb Cleanup application_controller and current_user 2019-09-17 12:37:37 +02:00
webhook_controller.rb skip verify authenticity token for helpscout 2020-08-10 17:19:22 +02:00