JS有代码:
console.log('private_pub')
PrivatePub.subscribe "/messages/new", (data, channel) ->
console.log(123)
Rails的代码:
PrivatePub.publish_to "/messages/new", :chat_message => "Hello, world!"
puts '12345'
我在JS中有'private_pub'消息,在控制台有'12345',但我从来没有在JS中获得'123'!怎么了?我该如何解决? Rails 4.