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

Trouble managing multiple config files #353

Open
Th0t opened this issue Apr 12, 2020 · 0 comments
Open

Trouble managing multiple config files #353

Th0t opened this issue Apr 12, 2020 · 0 comments

Comments

@Th0t
Copy link

Th0t commented Apr 12, 2020

Hey there,

I'm using rails-erd since the start of a project and now I got a pretty large data structure, it became hard to read a single erd graph, so I tried to split it into meaningful parts.

For that I found the config_file option really useful, I ended up creating a custom rake task that calls erd with all my different config files. The pain point is that I now have my own rake task to generate splited erds, but the default one is still for the whole DB.

I managed the auto-call when migration by overriding "self.update_model" method in ERDGraph::Migration from lib/tasks/auto_generate_diagram.rake

I also cleared "erd" task in my Rakefile to redefine it with my own erd-generating rake task. So when I type "rake erd" I got the expected output.

But at least when I run "bundle exec erd" it is still the gem default task called.

Is there an easiest way to obtain the same result ? Or a way to change default behavior to end with same behavior from all entry points ? Maybe it could be a new feature ?

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