Man, after dealing with legacy code so many times, this is a great idea. Many times developers forget (or don’t care?) about the next developer that will work on the code someday. This would be good to throw into a rake task to create the full list of descriptions. Thanks for this!!
Originally posted on livingjim:
I end up using Ruby on Rails apps as tools within larger projects, not as an end to a web application need. As such, my involvement with my Rails app may go months between those intensive times where my head is in the Rails app, and I forget many of the nuances and whys of the architecture. So I recently built up a little extra goodness in my current project to help me when I return to it next time.
In short, I have added to each model a “description” method that just (now anyway) prints out my thinking about what the model is there for and how it is to be used, what caveats exist in the model, and so on. So if my app has a Product model, I can work in the Rails console with it and issue a Product.description call to print out all that stored…
View original 166 more words