- May
- 20
- 2008
Documentation in your Rails app
By: Matt Elhotiby | Tags:Have you ever wanted to generate documentation for your rails application quick and easy? I have recently come across a helpful rake task to help do just that. First lets add a comment to the User class to view it later in the documentation.
#This the User class that saves the customers login info to the site. class User < ActiveRecord::Base # associations has_and_belongs_to_many :roles
Then go to console and use the rake task
rake doc:app
It generates all the html and the stats
Generating HTML... Files: 448 Classes: 298 Modules: 154 Methods: 1340 Elapsed: 45.815s
Your documentation is generated in the doc/app folder with the comments that you added to the User class.

Share this post
Other posts you may enjoy
You can leave a response, or trackback from your own site.

