Is there a more efficient way to trigger events when the value of an input
tag changes (i.e., whenever a character is entered or deleted) and display these values in the controller without relying on ajax?
Currently, my approach involves implementing a JavaScript snippet that uses addEventListener
to monitor changes in the input
element (see here) and then makes an ajax call to a Rails controller to update the value of the input
tag. However, using ajax seems overly complicated compared to a more native solution in Rails, which I have been unable to locate.