I have been Googling and beating my head up against a wall for 2 days and now I finally just need to ask you guys.
I want to simply create a Javascript file in Rails 6 and then call the function on a button in an erb file.
THAT'S IT.
Why is this not the simplest thing in the world?
After realizing that I was getting 2 different sets of instructions from the internet, one for rails 5 and previous and the other for rails 6, I tried looking for specifically Rails 6 answers. They were still much too complicated for such a simple problem and often were about bringing in external libraries. I don't want external libraries. I want my own javascript. And I want to call it in my erb files.
I appreciate anyone helping me out on this.