Changed .delegate() to .on() in rails-ujs