Why do you find describing the fields in the model unDRY? If it were me, that's exactly where I'd put them as this is where developers will interact with those fields the most.
Another idea might be to patch migrations to use the field comment feature of some DBs like MySQL. However without actually checking that, it's not really helpful as most developers won't regularly check the schema.rb or the raw database to see those values. Ultimately if the purpose is for documentation, it should be somewhere that developers will expect to find documentation: the README, the doc/ directory, or in comments in the code (such as in the model that it is relevant to). Bo On Wed, Nov 4, 2009 at 10:56 AM, MarkBennett <[email protected]>wrote: > > I'm working on an application where the fields in our model have very > specific meanings and affect payments made to our users. Because of > this understanding the purpose and meaning of each field is important. > > I've been looking for the best way to describe the model fields, and > would ideally like to leave comments in the db/schema.rb, however this > if rebuild after I run each migration. What is the best way to > document fields and to share their purpose with the team? I can't > find a comment or description field to use the migration code, and > describing each field in the model file itself doesn't seem very DRY. > > Thanks! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en -~----------~----~----~----~------~----~------~--~---
