How to make AJAX calls in Rails 5.1

This tutorial also shows how to manually import jQuery in Rails 5.1+