允许用户访问特定/关注的文章?
这就是我所拥有和想要做的..我有一个主要的“用户”表。然后是一个“记录”表。因此,当用户登录时,他们会看到自己的记录,但只能访问特定记录。有谁知道如何将表行分配给用户(我是关系数据库)的好方法/技术(或知道好的教程)。
类似的概念就像 Twitter,即用户如何关注他人。
So heres what I have and want to do.. I have a main "users" table. And then a "records" table. So when a user signs in, they see their records, but they only have access to specific records. Does anyone know a good method/technique (or know of a good tutorial) as to how to assign table rows to a user (I its relational database).
A similar concept would be like twitter, how users follow others.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 Rails for Zombies。这是一个在线教程,为僵尸创建类似 Twitter 的应用程序。如果我没记错的话,它将涵盖您的问题,并为您提供关于模型与数据库相关的相互关系的良好背景。
Take a look at Rails for Zombies. It's an online tutorial that creates a twitter like application for zombies. If I recall correctly it will cover your question and give you a good background on the inter relationships of your models as they pertain to the database.