Ruby on Rails - Achievement system

Ruby on Rails - Achievement system


Job Description needs an achievement system.

The system needs some kind of rule engine, preferably if it can be added through my admin page. But isn't a requirement, due to it's complexity.

Achievement examples:
- Adding [10,20,50,100] TV shows to your favorites
- Spent watching [10, 50, 100, 500, 1000] hours worth of episodes
- Marked [100, 500, 1000, 5000] episodes as watched

Achievements can be both 1 per user, or several of the same one. Example:
- "Adding 10 TV shows to your favorites" can only be awarded once per user
- "Login once every day, for a week" can be awarded multiple times per user

Add on:
Would be great if users will be awarded in real-time (as soon as a background process goes through the check for awarding users) and get a notification. Comet + Growl?