# DB field documentation suggestions wanted

**URL:** <https://www.ruby-forum.com/t/db-field-documentation-suggestions-wanted/168449>\
**Category:** Rails\
**Created:** [May 20, 2009, 10:24pm UTC](https://www.ruby-forum.com/t/db-field-documentation-suggestions-wanted/168449 "2009-05-20T22:24:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [May 20, 2009, 10:24pm UTC](https://www.ruby-forum.com/t/db-field-documentation-suggestions-wanted/168449/1 "2009-05-20T22:24:10Z")

</div>

Where do folks generally document their database attributes?

They appear as attributes (or methods) to the model. Is there a way to  
add pseudo methods so that rdoc picks them up along with their  
documentation but they are not really defined in the ruby code? Or do  
people just add comments for the model class and document the fields  
there?

Also, as I recall, somewhere there is a tool that will run and pull the  
fields from the DB (or the migration?) and put them as comments in the  
model. Does that tool still exist?

Thank you,  
Perry

---

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [May 21, 2009, 5:32pm UTC](https://www.ruby-forum.com/t/db-field-documentation-suggestions-wanted/168449/2 "2009-05-21T17:32:40Z")

</div>

I think this is the tool you mean:

[http://agilewebdevelopment.com/plugins/annotate\_models](http://agilewebdevelopment.com/plugins/annotate_models)

---

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [May 21, 2009, 6:40pm UTC](https://www.ruby-forum.com/t/db-field-documentation-suggestions-wanted/168449/3 "2009-05-21T18:40:04Z")

</div>

Roy P. wrote:

> I think this is the tool you mean:
> 
> [http://agilewebdevelopment.com/plugins/annotate\_models](http://agilewebdevelopment.com/plugins/annotate_models)

Also take a look at HoboFields, which sort of does the same thing in  
reverse. I’ve been experimenting with it and finding it pretty useful.  
Basically, you define the fields right in the model file, and it writes  
migrations for you.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
