An achievement system generator for Rails
Pull request Compare This branch is even with paulca:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Paths of Glory

Paths of Glory sets you on the road to achievements!

In short, it's a re-usable model for creating an achievement system.

It's extracted from and inspired by:


Paths of Glory is easy to install.

As a plugin:

./script/plugin install git://

Or as a gem. Add this to your environment.rb:

gem install paths_of_glory

config.gem 'paths_of_glory', :lib => false

Then generate the migration:

./script/generate paths_of_glory

And run the migration:

rake db:migrate

This creates the tables.

Then, in your User model:

class User < ActiveRecord::Base
  include Achievements

and in config/environment.rb, add app/models/achievements to your load path:

config.load_paths += %W( #{RAILS_ROOT}/app/models/achievements )

Basic Usage

Paths of Glory gives you access to a DSL to generate achievements. Achievements can have multiple levels or can just be standalone achievements.

The pattern is basically:

Create an achievement:

./script/generate achievement Glory

This gives you app/models/achievements/glory.rb and app/models/achievements/glory_observer.rb with some bootstrapped code.

You're on your own after that. Have fun!

Running the tests

You can run the tests by checking out the code into vendor/plugins of a Rails app and running:


About me

I'm Paul Campbell. I'm an avid Ruby on Rails web developer. Follow my ramblings at

Follow me on Twitter

Copyright (c) 2010 Paul Campbell, released under the MIT license