Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Annotate Models

Annotate Models

Add a comment summarizing the current schema to the top of each ActiveRecord model source file:

  1. Schema as of Sun Feb 26 21:58:32 CST 2006 (schema version 7) #
  2. id :integer(11) not null
  3. quantity :integer(11)
  4. product_id :integer(11)
  5. unit_price :float
  6. order_id :integer(11) #
class LineItem < ActiveRecord::Base
  belongs_to :product
. . .

Does not cope with models in sub-directories of app/models.

Author: Dave Thomas Pragmatic Programmers, LLC

Released under the same license as Ruby. No Support. No Warranty.

Back up your model files before using…

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly