activerecord_views icon indicating copy to clipboard operation
activerecord_views copied to clipboard

Utility method to remove dead ActiveRecord views

Open jasoncodes opened this issue 11 years ago • 0 comments

Now that we have class names in the metadata table, we could try to load each constant and drop the view if it fails.

What should we do if another view depends on the view about to be dropped? We should not cascade as that would cause the metadata table to be out of sync. Sorting and dropping the leaves first should work fine though.

We should be able to run this from the ActiveSupport.on_load :active_record railtie to clean up automatically.

jasoncodes avatar Dec 10 '14 22:12 jasoncodes