Self Checks
URL
https://liambx.com/docs/parser/supported-formats/rails#when-associations-dont-appear-in-the-er-diagram
Current Text
A potential workaround—though it requires additional setup—is to manually add add_foreign_key statements to db/schema.rb in your CI/CD process, then run Liam CLI. This way, the diagram will reflect those associations.
Below is a conceptual example code snippet showing how you might gather table names from models with belongs_to associations and add foreign keys manually (note: this example is illustrative and may need adjustments for production use):
[...]
Suggested Improvement
As a solution, the rails-erd gem can load the Rails application and export relationships in TBLS format, which is handled by liam.
Reason for Suggestion
Simpler solution
Related References
voormedia/rails-erd#471
Self Checks
URL
https://liambx.com/docs/parser/supported-formats/rails#when-associations-dont-appear-in-the-er-diagram
Current Text
A potential workaround—though it requires additional setup—is to manually add add_foreign_key statements to db/schema.rb in your CI/CD process, then run Liam CLI. This way, the diagram will reflect those associations.
Below is a conceptual example code snippet showing how you might gather table names from models with belongs_to associations and add foreign keys manually (note: this example is illustrative and may need adjustments for production use):
[...]
Suggested Improvement
As a solution, the rails-erd gem can load the Rails application and export relationships in TBLS format, which is handled by liam.
Reason for Suggestion
Simpler solution
Related References
voormedia/rails-erd#471