PrivatePub is not defined error Rails 3.2 private pub

匆匆过客 提交于 2019-12-04 07:30:52

I find the problem, I will write solution because anyone else should get this error:

My javascripts is placed in bottom so

<%= subscribe_to "/mesajlar/new" %> line calling before private_pub.js is loaded.

So, in index file

<% content_for :bottom do %>
<%= subscribe_to "/mesajlar/new" %>
<% end  %>

sould solve this.

Jayson Mandani

I think you forgot to add private_pub.js to application.js:

//= require private_pub
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!