铁轨“徽章” 输入插件/教程?

发布于 2024-07-25 01:11:20 字数 80 浏览 6 评论 0原文

有谁知道是否有 Rails gem/插件/教程,展示如何创建类似于 stackoverflow 使用的徽章/成就系统。

谢谢。

Does anyone know if there is a Rails gem/plugin/tutorial that shows how to create a Badge/Achievement system similar to what stackoverflow uses.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

水染的天色ゝ 2024-08-01 01:11:20

您可能还想尝试成就 gem:https://github.com/mrb/achievements

基于 Redis,因此您需要首先使其正常工作。 基本上,您可以定义一堆成就上下文(查看的页面、发送的消息等)以及多个级别(如果需要)。 然后,您可以根据某些事件适当增加您的价值,然后您可以检查是否已达到成就。

此链接还对徽章/成就系统背后的思想进行了相对详细的解释: RoR成就系统-多态关联& 设计问题

You might also want to try the achievements gem: https://github.com/mrb/achievements

It's based on Redis, so you'll need to get that working first. Basically, you define a bunch of achievement contexts (pages viewed, messages sent, etc.) along with multiple levels if necessary. Then, you increment your value appropriately upon certain events, and you can then check if the achievement has been reached.

This link also has a relatively detailed explanation of the thinking behind a badge/achievement system: RoR Achievement System - Polymorphic Association & Design Issues

杯别 2024-08-01 01:11:20

我认为这不是一个框架,而是一个设计问题。 如果您知道如何以面向对象的方式构建它,您最终也会知道如何在 Rails 中构建它。

如果您是 Rails 新手,请查看有关“Active Record Associations”的 Rails 指南尝试识别“徽章/成就系统”的模型和关联。

除此之外:不,我不知道有任何交钥匙宝石/插件/教程可以帮助您构建这样的系统。

I think it's less a framework but a design question. If you know how to build it in an object-oriented way, you'll eventually know how to build it in Rails too.

If you're a Rails newbie, check out the Rails Guide on "Active Record Associations" and try to identify the models and the associations of your "badge/achievment system".

Besides that: No, I don't know of any turnkey-gem/plugin/tutorial that would help you build such a system.

如歌彻婉言 2024-08-01 01:11:20

还有Gioco,我还没尝试过:
http://joaomdmoura.github.io/gioco/

There is also Gioco, which I haven't yet tried:
http://joaomdmoura.github.io/gioco/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文