cleaning the javascript from application.html.erb and putting it in separate file others.js