51cb3a04a3
When Turbolinks is enabled, a `redirect_to` in a `format: :js` request will emit code that instructs Turbolinks to navigate to the page. Turbolinks will then load the redirection target as HTML, and display it. But with Turbolinks disabled, the same `redirect_to` will instead respond with a standard `302: redirect`. `Rails.ajax` will interpret this redirect as "Please perform the same call again to the redirected URL, in the same format" – and request our redirection target, but using `format: :js`. This breaks the "Publish procedure" button. In that case, we really want the page to be navigated to. Add an explicit JS redirect, so that the redirection occurs in HTML. |
||
---|---|---|
.. | ||
assigns_controller.rb | ||
attestation_templates_controller.rb | ||
instructeurs_controller.rb | ||
mail_templates_controller.rb | ||
procedures_controller.rb |