Sunday, August 17, 2008

Searching Ruby on Rails Docs just got a lot easier

Ruby on Rails is a big framework, with hundreds (thousands?) of methods and classes. Thanks to the clever folk at Nodeta, their new documentation app APIdock provides an easy-to-use search/browse interface to the whole of Rails documentation. To quote the site:

APIdock is a web app that provides a rich and usable interface for searching, perusing and improving the documentation of projects that are included in the app.

The site also provides documentation for Ruby and RSpec. Two really interesting features of the site are the versions bar graph and dynamic keyword search.

The versions bar graph along the top of each documentation page lets you "go back in time" to past versions of the documentation, by clicking on the version number. The green and red tabs indicate when and by how much the documentation changed for that version, which is handy when you're trying to figure out just when and in what way a particular method was changed or deprecated:

The dynamic keyword search displays a "find as you type" drop-down list from which you can select the relevant documentation page. A little pie graph icon, divided into five wedges, indicates by the number of filled-in wedges how much information is available for each item:

So for example there's a lot of information about the form_for helper, but very little about the apply_form_for_options! helper. If you get as lost in Rails as I do, or you're just wondering what is the difference between form_remote_for and remote_form_for (hint: the former is an alias for the latter).

Try it!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.