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.
Perry S. (Guest)
on 2009-05-21 00: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
Roy P. (Guest)
on 2009-05-21 19:32
(Received via mailing list)
I think this is the tool you mean:

http://agilewebdevelopment.com/plugins/annotate_models
Marnen L. (Guest)
on 2009-05-21 20:40
Roy P. 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
removed_email_address@domain.invalid
This topic is locked and can not be replied to.