Activate script tags from turbo frames - Rails

Viewed 350

When we return turbo frames in post request sometimes it is esential run javascript for example if I am calling a resource to update, there are two possible cases

  1. when it saves sucessfully then close the modal
  2. When it is not saved then show validation messages in modal

In both cases I am sending frame (its intentional not to use redirect or render).

Recently I found this issue & PR in github which is now merged. https://github.com/hotwired/turbo/pull/192

But it is not documented yet how to use it actually, Need help on that

0 Answers
Related