Rails:管理已读/未读消息 [英] Rails: Management of read/unread messages

查看:66
本文介绍了Rails:管理已读/未读消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于类似论坛的应用程序,我需要能够向每个用户显示未读(新)消息.是否有任何 Rails 插件/gem 用于此目的?

for a forum-like application I need the ability to show each user the unread (new) messages. Is there any Rails plugin/gem for that purpose?

或者:是否有任何提示可以有效地完成这项工作?我正在考虑一个额外的数据库表,用于存储每个用户的每条消息的未读状态(或已读状态?).但这似乎是蛮力方法,也许有更聪明的解决方案......

Or: Are there any hints to do this job in a efficent way? I'm thinking about an additional database-table storing the unread-status (or read-status?) of every message for every user. But this seems to be brute-force method, perhaps there is a smarter solution...

最好的祝福,乔治

推荐答案

与此同时,我根据上述想法创建了一个 Rails 插件,但改进了算法.在这里查看:
http://github.com/ledermann/unread

In the meantime I have created a Rails plugin based on my idea above, but with a more improved algorithm. Check it out here:
http://github.com/ledermann/unread

这篇关于Rails:管理已读/未读消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆