You can also try gem achievements: https://github.com/mrb/achievements
This is based on Redis, so you need to get started first. Basically, you define a set of achievement contexts (pages viewed, messages sent, etc.) along with several levels, if necessary. Then you accordingly increase your value on certain events, and then you can check if the achievement is achieved.
This link also provides a relatively detailed explanation of the thinking behind the badge / achievement system : RoR Achievement System - Polymorphic Association and Design Issues
Jack hoge
source share