Closed ahmedash95 closed 1 year ago
I looked at the code climate error and I think given what the method is doing it is easier to read this way rather than breaking it up into individual methods. I will defer to your judgement though @ahmedash95.
I would heartily endorse this. Worked great for me and avoids installing the what, two dozen dependencies that graphviz
wants through homebrew.
Added to my :development group
gem 'rails-erd', git: 'git@github.com:ahmedash95/rails-erd.git', branch: 'support-mermaid'
and then ran it as asked.
As an aside, I had been trying to do this with mermerd
, a go app, but this implmentation works way better for my usecase since on MySQL i could not get it to generate the schema I wanted.
Its also worthwhile that this works without having to connect to the db in the first place, so maybe they are complementary? In any case đ would merge again đ
:bump what can I do to help get this merged -- â¤ď¸ using it.
Hey @johnpaulashenfelter, glad to see how useful it is. let's ping the maintainers to check this and hopefully get it merged
PING @kerrizor, can you check this PR, please?
Thanks, as always, for your patience with my being slow on updates and responses here! This is a great contribution, and I'm happy to merge. I've wanted to add mermaid support for quite some time, and this is a great first step; I especially appreciated making it an option, while maintaining graphviz as the default for now. I suspect that the direction to go for a next major release will be to flip this and make đ§ââď¸ the default generator, but this gives us the ability to exercise this implementation and uncover any deeper problems before proceeding. Well done.
Regarding https://github.com/voormedia/rails-erd/issues/226. This PR adds support for generating diagrams using Mermaid.
here is an example for Event Forms sample schema.
Mermaid generator can be configured by passing
generator=mermaid
to the erd command or specifying the generator in configuration file to be mermaid. and it generates.mmd
file.