Prepare Elementary JS to work with Rails