rails-erd icon indicating copy to clipboard operation
rails-erd copied to clipboard

Hide ApplicationRecord

Open mathieujobin opened this issue 5 years ago • 5 comments

Maybe as an option, recent rails application added a base class between AR::Base and application models.

currently, I see it on my ERD, but I'm not too sure I want it. It can be confusing for Data Scientist not familiar with Rails and OOP.

mathieujobin avatar Sep 26 '18 02:09 mathieujobin

@mathieujobin which rev of Rails is doing this? 5.2.2? 6.0.0?

kerrizor avatar May 14 '19 08:05 kerrizor

Rails 6+, although I think ApplicationRecord was introduced in 5.

marktellez avatar Sep 09 '20 09:09 marktellez

@kerrizor To add onto this, with Rails 6.0.3.3, when using the bundle exec rake erd or bundle exec erc, everything generates as expected

But using the auto generation after migration task, the ActiveRecord::SchemaMigration and ActiveRecord::InternalMetadata rails models are included in the erd

image

tyler-wel avatar Oct 16 '20 03:10 tyler-wel

I still would like to have a solution for this.

thank you

mjobin-mdsol avatar Oct 06 '22 04:10 mjobin-mdsol

Found it

turn it off with

polymorphism: false

mjobin-mdsol avatar Oct 07 '22 01:10 mjobin-mdsol