Schema Defining Plugin
Listen to this article
Just a quick update on my plugins. Two of them—Foreign Key Migrations and Row Version Migrations—needed to know if they were being run as part of ActiveRecord::Schema.define() so I extracted the common code into yet another plugin: Schema Defining. This new plugin provides a class method—ActiveRecord::Schema.defining?—that returns true if ActiveRecord::Schema.define() is currently running; false otherwise. Probably not a hugely useful plugin in the main but certainly a must have if, like me, you have a number of migration plugins that need to alter their behaviour accordingly.
Comments
Way to make it DRY :-)
Posted by: Ted | June 4, 2006 01:21 PM