Skip to content

Update rails-erd 1.7.2 → 2.0.2 (major)#1127

Open
depfu[bot] wants to merge 1 commit into
developfrom
depfu/update/rails-erd-2.0.2
Open

Update rails-erd 1.7.2 → 2.0.2 (major)#1127
depfu[bot] wants to merge 1 commit into
developfrom
depfu/update/rails-erd-2.0.2

Conversation

@depfu

@depfu depfu Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ rails-erd (1.7.2 → 2.0.2) · Repo · Changelog

Release Notes

2.0.2

Rails ERD 2.0.2 - Less Is More ✨

Sometimes you just want to keep some things private. Your models have secrets, and now Rails ERD respects that. 🤫

✨ New Features

  • Hide attributes on a per-model basis (#421, #457)

    Ever wanted to show User in your ERD but hide those 47 Devise columns? Now you can! The new exclude_attributes option lets you selectively hide attributes for specific models while keeping everything else visible.

    # .erdconfig
    exclude_attributes:
      User:
        - encrypted_password
        - reset_password_token
        - confirmation_token

    Huge thanks to @RSeven for this contribution! 🙌

🐛 Bug Fixes

  • Fix crash with polymorphic associations on Rails 8 (#454, #455, #456)

    Rails 8 users with polymorphic associations and the exclude option were getting an unwelcome NoMethodError surprise. Not anymore! Thanks to @kennethgeerts for squashing this one. 🪲➡️💀


Full Changelog: v2.0.1...v2.0.2

RubyGems: https://rubygems.org/gems/rails-erd

2.0.1

What's New

A quick patch release to keep your namespaced models happy!

Bug Fixes 🐛

  • Fix mermaid syntax errors for namespaced class names (#450, #451)

    Thanks to @aseroff for reporting that models like Admin::User and Api::V1::Resource were causing Mermaid syntax errors! Turns out Mermaid's erDiagram needs double quotes around entity names containing ::. Now your beautifully organized namespaced Rails models render correctly.

  • Fix test helper for namespaced models (#451)

    While fixing the above, we discovered the test helper create_module_model was creating Admin::Author::Author instead of Admin::Author. Oops! 🙈

Internal 🔧

  • Use temp directory for test output files (#453)

    Tests now write diagram files to the system temp directory instead of polluting the project root. Cleaner repo, happier developers.


Full Changelog: v2.0.0...v2.0.1

Installation

gem 'rails-erd', '~> 2.0.1'

2.0.0

Rails ERD 2.0.0 - The Mermaid Era 🧜‍♀️

It's alive! After years of quiet maintenance, Rails ERD is back with its biggest update ever.

This release fundamentally reimagines how Rails ERD works. No more wrestling with Graphviz installations, no more mysterious dot executable errors, no more platform-specific headaches. Just run bundle exec erd and get a beautiful diagram that renders right in your GitHub README, GitLab wiki, or Notion docs.

🌊 Why Mermaid?

Mermaid diagrams are text-based and render natively in:

  • GitHub (READMEs, issues, PRs, wikis)
  • GitLab (everywhere!)
  • Notion, Obsidian, and countless other tools
  • Any Markdown renderer with Mermaid support

No more generating PDFs, committing images, or explaining to teammates how to install Graphviz. Your ERD lives in version control as readable text and renders beautifully wherever you need it.

💥 Breaking Changes

Setting Old Default New Default
generator graphviz mermaid
filetype pdf mmd
mermaid_style classdiagram erdiagram
direction RL (right-to-left) TB (top-down)
ruby-graphviz required optional

🚀 Migration Guide

Most users: Just run bundle exec erd and enjoy your new Mermaid diagram!

To continue using Graphviz output:

# Gemfile
gem 'ruby-graphviz'
bundle exec erd generator=graphviz filetype=pdf

To use classDiagram style instead of erDiagram:

bundle exec erd mermaid_style=classdiagram

✨ New Features

  • Mermaid erDiagram style with crow's foot notation and PK/FK markers (#445)
  • Full CLI parity - CLI now supports all options that rake task supports (#446, #447)
  • Orientation support - Mermaid direction respects the orientation option (#448)

🐛 Bug Fixes

  • Fix --only flag with single model (#441)
  • Fix nil destination crash (#440)
  • Fix empty .erdconfig crash (#443)
  • Fix CLI string-to-symbol option conversion (#447)
  • Exclude Rails 8 Solid* internal models (SolidQueue, SolidCache, SolidCable) (#437, #438, #439)
  • Suppress Ruby 3.4 hash key warnings (#436)

📚 Documentation

  • Completely updated README for Mermaid-first workflow (#444, #448)
  • Added non-Rails usage example for gems with ActiveRecord models (#444)

🙏 Thanks

This release closes 65+ issues dating back to 2020. Special thanks to everyone who reported bugs, submitted PRs, and kept using Rails ERD over the years. Your patience is appreciated!

📊 Example Output

Running bundle exec erd now produces:

erDiagram
    direction TB
    User {
        integer id PK
        string name
        string email
        integer organization_id FK
    }
    Organization {
        integer id PK
        string name
    }
    Post {
        integer id PK
        string title
        text body
        integer user_id FK
    }
    Organization ||--o{ User : ""
    User ||--o{ Post : ""
Loading
Loading

Full Changelog: v1.7.2...v2.0.0

RubyGems: https://rubygems.org/gems/rails-erd

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 6 commits:

🗑️ ruby-graphviz (removed)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu Bot added dependencies Pull requests that update a dependency file Technical debt Technical debt labels Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file Technical debt Technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants