A Rails Documentation Trick

Posted by Jeremy Voorhis Wed, 18 Oct 2006 15:22:00 GMT

Most Rails projects that I work on these days are on some revision of edge Rails, depend on a few plugins and a development team of more than one. To keep up with the changes, I run the doc:rails and doc:plugins tasks semi-frequently, and I always make an effort to document the application code I write for posterity’s sake.

To make the documentation more usable – for myself, anyways – I created a task called doc:all that compiles the documentation for Rails, plugins and application code in one place. By doing so, I can usually find what I’m looking for quickly by using Ctrl-f find in my browser. Perhaps you’ll find this Rake task useful too.

As an added bonus, the task will use Jamis Buck’s RDoc template as seen at rails.rubyonrails.org if it is available at RAILS_ROOT/doc/jamis.rb. Enjoy.

Files

Comments

  1. Alex Payne said about 3 hours later:

    Super handy. Thanks.

  2. Mr_mister said about 11 hours later:

    Thank you.

    Could you describe how to install?

  3. Mr_mister said about 11 hours later:

    Found this in the Rakefile in my project root:

    1. Add your own tasks in files placed in lib/tasks ending in .rake,
    2. for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.

    Thanks :)

  4. JV said about 12 hours later:

    That would be it. Put jamis.rb inside of doc, for the safety of your eyes.

(leave url/email »)