Example code working in rails.

Had to add the script in the view, below all elements, in order for the script to load. Has to be a better solution, but this works for now.