Skip to content

Ruby gem for creating entity–relationship diagram with D3.js for your Rails application 📊

License

Notifications You must be signed in to change notification settings

RomanKrasavtsev/rails-erd-d3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Gem Version Code Climate GitHub license Downloads

Rails-ERD-D3

Create entity–relationship diagram with D3.js for your Rails application.

Demo

https://romankrasavtsev.github.io/rails-erd-d3/

Features

Rails-ERD-D3 gem contains the following functionality:

  • View models
  • View associations
  • View table structure
  • Filter where you could hide any models
  • Zoom in and zoom out
  • Rotate models

Installation

Add these lines to your application's Gemfile:

group :development do
  gem "rails-erd-d3"
end

Install gem:

$ bundle install

And then execute for creating file erd.html:

$ bundle exec rails-erd-d3

Todo

  • Add table name
  • Add polymorphic links
  • Freeze
    • On
      node.call(d3.drag()
            .on('start', dragstarted)
            .on('drag', dragged)
            .on('end', dragended));
      
    • Off
      node.call(d3.drag().on('drag', null))
      
  • Add link to another model in model window
  • Add tests
    • ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
  • Sort by:
    • number of connections
    • number of entries in the table
  • Show table structure on the diagram
  • Safe as jpg, png
  • Dependent destroy

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/RomanKrasavtsev/rails-erd-d3.

License

The gem is available as open source under the terms of the MIT License.

Author

Roman Krasavtsev, @romankrasavtsev

About

Ruby gem for creating entity–relationship diagram with D3.js for your Rails application 📊

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •