Prepare Elementary JS for work in Rails