thechrisoshow / what_column
- Source
- Commits
- Network (1)
- Issues (1)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
ee8d90d
commit ee8d90d19d9fbc4f35145635386ffbd7271a8f7e
tree dc0a2e90b79127ab9f61eae9cf1384f363a2842b
parent ede384a913320153dcba3dff14f16817a425dc73
tree dc0a2e90b79127ab9f61eae9cf1384f363a2842b
parent ede384a913320153dcba3dff14f16817a425dc73
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Apr 01 13:02:59 -0700 2009 | |
| |
MIT-LICENSE | Wed Apr 01 14:47:43 -0700 2009 | |
| |
README.markdown | ||
| |
Rakefile | Tue Mar 31 00:35:29 -0700 2009 | |
| |
init.rb | Sun Apr 05 06:14:23 -0700 2009 | |
| |
install.rb | Tue Apr 07 09:49:39 -0700 2009 | |
| |
lib/ | ||
| |
tasks/ | Tue Apr 07 09:23:31 -0700 2009 | |
| |
test/ | ||
| |
uninstall.rb | Tue Mar 31 00:35:29 -0700 2009 |
README.markdown
What Column?!?
A Rails plugin that details columns in ActiveRecord models.
Tired of having to look at schema.rb to figure out what columns belong to a model?
Well no more!
With the what_column plugin a comment appears at the top of your models displaying the column details.
INSTALLATION
Go into your Rails folder and type:
script/plugin install git://github.com/thechrisoshow/what_column.git
USAGE
Everytime you run migrations in development mode your models will be updated with a comment block detailing comment information:
class User < ActiveRecord::Base
# === List of columns ===
# id : integer
# name : string
# created_at : datetime
# updated_at : datetime
# =======================
end
It only works for those models under app/models. And as it writes directly to your model files make sure that you use source control!
Should you wish to run the commands manually there are rake commands. Check 'em out:
rake what_column:add #=> Adds column details to models
rake what_column:remove #=> Removes column details from models
Copyright (c) 2009 Chris O'Sullivan, released under the MIT license

