Stimulus JS - Accessing an action in another controller - DEV Community
If you've used Stimulus before, you should know that controllers are scoped. This can be useful, but you might come across a case where we want to trigger an action in a controller that is out of scope.We can do this with a custom event.I'll start off with a tl.
Stimulus JS - Accessing an action in another controller - DEV Community #ruby #rubydeveloper #rubyonrails #dev #stimulus https://rubyonrails.ba/single/stimulus-js-accessing-an-action-in-another-controller-dev-community