DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Tatjana has posted 5 posts at DZone. View Full User Profile

Annotate Models

  • submit to reddit
$ ruby script/plugin install
The plugin adds a new rake task for you to generate the model annotations:
$ rake annotate_models
Here's a sample of what the plugin adds to your model:
# Schema version: 3
# Table name: programs
# id :integer(11) not null, primary key
# title :string(255)
# description :text
# asset_url :string(255)
# link :string(255)
# language :string(255)
# author :string(255)

class Program<ActiveRecord::Base