rails-erd
rails-erd copied to clipboard
Fix invocation split once and for all
$ erd
and $ rake erd
are handled by 2 completely different codepaths. This is an oversight that is causing a lot of pain, both for our users and for me trying to troubleshoot people's problems. This needs to be fixed in the next point release.
In case it might be useful to anyone, in the meantime I'm using this workaround to run erd
(and not rake erd
) automatically after migrations:
# lib/tasks/db.rake
Rake::Task['db:migrate'].enhance do
system('erd') if Rails.env.development?
end