this javascript should go to `app/assets/javascripts` as object. Dont define js functions in haml templates