https://www.railsjazz.com/blog/javascript-code-executed-inside-ruby-on-rails-app