mampf icon indicating copy to clipboard operation
mampf copied to clipboard

Get rid of Rails UJS entirely in favor of Turbo

Open Splines opened this issue 3 months ago • 0 comments

Follow-up to #801 (which was tackled in #824). I originally followed the Turbo Upgrade guide here. In the long run, we should try to get rid of Rails UJS entirely, such that we can totally focus on Turbo. This will also allow us to remove one further dependency.

Among others, we need to

  • [ ] Remove the app/controllers/concerns/turbo/redirection.rb file that is currently used as a "shim"
  • [ ] Set config.action_view.form_with_generates_remote_forms = false (it is true right now)
  • [ ] Replace things like data-method="post" by respective Turbo syntax
  • [ ] Replace method: ... on links with Turbo syntax
  • [ ] Set status: :unprocessable_entity when re-rendering the same page. This should be done in conjunction with a bigger shift in how we display form error messages (preferably inline, see my blog post on this).
  • [ ] Check if forms that expect .js.erb need a data-remote: true flag (see here).

See this awesome blog post for more things we'd have to watch out for. Also this blog post.

Splines avatar Sep 21 '25 22:09 Splines