Forum: Ruby on Rails DB field documentation suggestions wanted

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0ce4db5e1083663c575158643313852c?d=identicon&s=25 Perry Smith (pedzsan)
on 2009-05-20 22:24
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
D6434aa0b7b350f8c3ed0119d81b2ead?d=identicon&s=25 Roy Pardee (rpardee)
on 2009-05-21 17:32
(Received via mailing list)
I think this is the tool you mean:

http://agilewebdevelopment.com/plugins/annotate_models
Dd2d775dea75b381edb1bbf0600a0907?d=identicon&s=25 Marnen Laibow-Koser (marnen)
on 2009-05-21 18:40
Roy Pardee wrote:
> I think this is the tool you mean:
>
> 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
marnen@marnen.org
This topic is locked and can not be replied to.