title: Rails Badge / Achievements System Dynamic Master List
body: <p>So I am using the method in: <a href="https://stackoverflow.com/questions/885277/how-to-implement-an-achievement-system-in-ror">How to implement an achievement system in RoR</a> to implement a badges/achievement system on my app.</p>
  
  <p>This has worked great thus far, but I am wanting to have a "master list" of all the badges that currently exist on the site.  As this is continually increasing, I'd like it if this list could dynamically populate itself, instead of me having to update it by hand.</p>
  
  <p>This sounds pretty easy, but because of how the achievements system works (the various types of badges are all subclasses of the Achievement.rb model...there are many instances of the same badges in the db) I am not sure of how to be able to determine all the subclasses of the Achievements model.</p>
  
  <p>Additionally, I would like for each badge to have its own show page (example url: <a href="http://www.mysite.com/achievements/badge1" rel="nofollow noreferrer">http://www.mysite.com/achievements/badge1</a>)</p>
  
  <p>So within this master list the badge images will look something like this:</p>
  
  <pre><code>&lt;%= link_to "#{image_tag @achievement.photo}", achievement_path(@achievement) %&gt;
  </code></pre>
  
  <p>However, yet again, I have no idea how to iterate through all the subclasses of the Achievement model.</p>
  
  <p>Does this make sense? How should I go about doing this?</p>
  
  <p>Thanks,</p>