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. |
||
---|---|---|
.. | ||
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 |