public
Description: Merb port of the Rails annotate_models plugin written by Dave Thomas
Homepage:
Clone URL: git://github.com/jrun/merb_annotate_models.git
Chetan Mittal (author)
Wed Nov 05 08:38:11 -0800 2008
name age message
file .gitignore Loading commit data...
file ChangeLog
file README.textile
file Rakefile
directory lib/
directory spec/

merb_annotate_models

merb_annotate_models annotates your merb app activerecord models with schema details

Version

0.0.2

Install

  • Download or git clone merb_annotate_models from merb_annotate_models @ github
  • Advanced – Update MERB_VERSION and MERB_AR_VERSION with the latest gems installed on your computer
  • run “sudo rake install” – without quotes

Schema format that gets added

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
. . .

Note that this code will blow away the initial comment block in your models if it looks ike it was previously added by annotate models, so you don’t want to add additional text to an automatically created comment block.

Back up your model files before using…

Credits

Rails version:
  • Dave Thomas – Pragmatic Programmers, LLC

Merb version:

License

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