Skip to content

Commit

Permalink
Add Rails Mermaid ERD gem
Browse files Browse the repository at this point in the history
Why these changes are being introduced:

EngX has been discussing ways to add more visual documentation
to our applications. The Rails Mermaid ERD gem is one way to
achieve that.

Relevant ticket(s):

N/A

How this addresses that need:

This adds the Rails Mermaid ERD gem. However, it does not include the
actual ERD markdown, because it doesn't work just yet (see side effects).

Side effects of this change:

GitHub cannot currently render rich display Mermaid diagrams. Apparently,
this has been fixed upstream, but GitHub is a few versions behind. Once this
is fixed in GitHub, we should generate the diagram, include it in the readme,
and update the PR template.
  • Loading branch information
jazairi committed Sep 7, 2023
1 parent 3c1c67b commit d647acd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ coverage

storage
.vscode

# Ignore Rails Mermaid ERD gem generated HTML. (We put the markdown in the readme instead.)
docs/etd_erd.html
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ group :development do
gem 'dotenv-rails'
gem 'letter_opener'
gem 'listen'
gem 'rails-mermaid_erd'
gem 'rubocop'
gem 'rubocop-rails'
gem 'scout_apm'
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ DEPENDENCIES
pg
puma
rails (~> 7.0)
rails-mermaid_erd
rubocop
rubocop-rails
rubyzip
Expand Down
3 changes: 3 additions & 0 deletions config/mermaid_erd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# result path
# default "mermaid_erd/index.html"
result_path: docs/etd_erd.html

0 comments on commit d647acd

Please sign in to comment.