ERDiagram
With the help of ER diagram we can see what relation does these model have in the application.
Add the gem to generate E-R Diagrams for the model generated.
gem 'rails-erd'
run bundle install.
To generate ER diagram run the command bundle exec erd
Graphviz produces error if its not installed
Failed: RuntimeError: Saving diagram failed!
Graphviz produced errors. Verify it has support for filetype=pdf, or use filetype=dot.
Original error: Format: "pdf" not recognized. Use one of: canon cmap cmapx cmapx_np dot eps fig gv imap imap_np ismap pic plain plain-ext pov ps ps2 svg svgz tk vml vmlz xdot xdot1.2 xdot1.4
Install Graphviz
brew reinstall graphviz --with-bindings --with-freetype --with-librsvg --with-pangocairo
Update the gem rails-erd to avoid futher errors.
gem 'rails-erd', github: 'ready4god2513/rails-erd', branch: 'rails-4.2-support- fix'
Cheers !!