当我已经开始工作后,如何使用 ruby on Rails 设置功能性聊天框布局?
我刚刚完成了主宰的实施。我运行了 redis 服务器和剑圣,它们工作得很好。我已经使用 irb 测试了本地主机,并且确实出现了文本。
我基本上是按照github上的步骤来的: https://github.com/maccman/juggernaut
但现在我想用 ruby 构建视图Rails 并且实际上能够像任何给定网站上的实际聊天室一样使用/测试聊天室,而不是通过 irb 编写消息。
我应该使用脚手架来构建布局/视图吗?谢谢!
我希望我可以发布我的屏幕截图,但我的声誉不够高。
I just finished implementing juggernaut. I ran both the redis server and juggernaut and they work fine. I have tested out the local host using irb and texts do appear.
I've basically followed the steps on 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.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Railscast #260 处理类似的主题,但 Ryan 选择使用 Faye 作为消息传递服务器。然而,您应该很容易适应他构建的示例聊天应用程序。
这里有一个 GitHub 上的项目源代码的链接此处截屏视频的文本版本。
脚手架可能对您有用,但是严格遵守 REST 约定可能很困难,我会尝试使用 Rails 创建消息,然后在创建后使用 Juggernaut 更新消息客户端。
Railscast #260 deals with a similar topic however Ryan chose to use Faye as the messaging server. 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.
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.