标签: jquery ruby-on-rails ruby-on-rails-4 turbolinks
我的应用程序上有这个JS
$(document).on('page:before-change', function(){ if($('.chat-text-field').val()) return confirm("Your message hasn't been sent yet. Do you still want to leave?"); });
原来这条消息被激发了3次。我已经在使用jquery.turbolinks gem了。还有其他什么缺失吗?