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. |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
dashboards | ||
fields | ||
graphql | ||
helpers | ||
javascript | ||
jobs | ||
lib | ||
mailers | ||
models | ||
policies | ||
serializers | ||
services | ||
validators | ||
views |