[Rails] [ANN] ColumnComments Plugin

Jodi Showers
Fri, 28 Apr 2006 13:52:16 -0000

On 27-Apr-06, at 6:22 PM, Duane Johnson wrote:
>
> I''m not quite sure I understand your question.  Currently, the
> annotations go right in to the comment section of the model.  The
> "rake doc:reapp" task can then be called to automatically create
> documentation from that comment section (assuming there are no
> other comment blocks between the auto-generated block and the class
> itself).  Is this what you''re after?
>
> Duane

Thanx Duane - (just waking up, rubbing sleep out of my eyes, and
trying to summarize)

I have some ''decorator'' methods that pretty up the output from
the
database (think phone numbers, postal codes, etc). Some times these
methods bring together data from multiple fields to build a visually
pleasing output such as name (honoration + firstname + initial +
lastname). These fields are only present in the Model.

As the ColumnComments plugin works on the database column (as it
should!), I guess you''re saying I should just add comments to the
ruby source code that rdoc picks up?

I''d like to provide my users with a way to query the database column
+ public model attributes, and CRUD the comments. I can think of ways
to do this with a data dictionary in the database, but your
announcement got me thinking their might be a better way.

Is that clear? (hoping I''m awake enough by now)

Cheers,
Jodi