Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility method to remove dead ActiveRecord views #11

Open
jasoncodes opened this issue Dec 10, 2014 · 0 comments
Open

Utility method to remove dead ActiveRecord views #11

jasoncodes opened this issue Dec 10, 2014 · 0 comments

Comments

@jasoncodes
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant