[英]How do I set up a functional chat box layout with ruby on rails after I have gotten juggernaut to work?
I just finished implementing juggernaut. 我刚刚完成了剑圣的实施。 I ran both the redis server and juggernaut and they work fine. 我运行了redis服务器和juggernaut,它们工作正常。 I have tested out the local host using irb and texts do appear. 我已经使用irb测试了本地主机并且显示了文本。
I've basically followed the steps on github: https://github.com/maccman/juggernaut 我基本上遵循了github上的步骤: https : //github.com/maccman/juggernaut
But now I would like to build the view with ruby on rails and actually be able to use/test the chat room like an actual chat room on any given website instead of writing messages through irb. 但是现在我想在轨道上用ruby构建视图,并且实际上能够像任何给定网站上的实际聊天室一样使用/测试聊天室,而不是通过irb编写消息。
Should I use scaffolding to build the layout/view? 我应该使用脚手架来构建布局/视图吗? Thanks! 谢谢!
I wish I could post up my screenshots but I don't have a high enough reputation. 我希望我可以发布我的截图,但我没有足够高的声誉。
Railscast #260 deals with a similar topic however Ryan chose to use Faye as the messaging server. Railscast#260处理类似的主题,但Ryan选择使用Faye作为消息服务器。 However it should be easy for you to adapt to the example chat application he builds. 但是,您应该很容易适应他构建的示例聊天应用程序。
There is a link to the project source on GitHub here and a text version of the screencast here. 这里有一个指向GitHub上项目源的链接和一个截屏的文本版本 。
Scaffolding may be useful to you here however it may be difficult to stick strictly to the REST conventions, I would attempt to use Rails for the creation of messages and then use Juggernaut to update the messages client side after creation. 脚手架可能对你有用,但是可能很难严格遵守REST约定,我会尝试使用Rails创建消息,然后使用Juggernaut在创建后更新消息客户端。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.