rails-erd-d3 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e040ff402ef8d1b7fdbfc3a7e1573651febd3735
4
- data.tar.gz: 1729523fa2deec511efa0426f13db96d694676de
3
+ metadata.gz: ce9f27882995e4ba5780bfb19156b3010a01fbe2
4
+ data.tar.gz: df7ceb9bd97c1fdb21349a9e0484e870a1ea79e5
5
5
  SHA512:
6
- metadata.gz: 94dc9f497b4840d56253f2311c5bdcb92976897b3b492f68f29b210b86b2ed09da316f8ed21b0d2f6826a5b4fbe6c982537f94de3915bb5d2b49e31f05002f09
7
- data.tar.gz: aaec67fdebd92cee2290313e8b806e0f592576f005345d3df1519b527b9e96caddade2892ccf8232cccf32b2ac0b6b325dba178517885961a20aa49e9cdd15a2
6
+ metadata.gz: 89587d8218b8c71c0baf7e1d5a26bb24e9d653f9e3830e6a2514c91ed2aa3e724459bcc5501e062972fd56358d422906cdc04b538535d20600d3e91593fa1161
7
+ data.tar.gz: 362f6fd597d83f21828186ffabcdc1f1b7c058df483d3d2b996cf47d72d8255fda2bc53c17304f59a9833bad494215df42ea012b81c3a8a16a4a0d032a45be82
data/lib/rails_erd_d3.rb CHANGED
@@ -64,7 +64,7 @@ class RailsErdD3
64
64
  }
65
65
  end
66
66
  end
67
- puts "Done"
67
+ puts "Data were successfully generated."
68
68
 
69
69
  data = { nodes: nodes, links: links }
70
70
  data.to_json
@@ -122,7 +122,7 @@ class RailsErdD3
122
122
  )
123
123
  ).result(binding)
124
124
 
125
- puts "Done"
125
+ puts "JS was successfully generated."
126
126
  end
127
127
 
128
128
  def self.get_modals
@@ -137,6 +137,6 @@ class RailsErdD3
137
137
  )
138
138
  ).result(binding)
139
139
 
140
- puts "Done"
140
+ puts "Modals were successfully generated."
141
141
  end
142
142
  end
@@ -16,8 +16,8 @@
16
16
  <tr>
17
17
  <th>#</th>
18
18
  <th>name</th>
19
- <th>macro</th>
20
- <th>foreign_key</th>
19
+ <th>type</th>
20
+ <th>class_name</th>
21
21
  </tr>
22
22
  </thead>
23
23
  <tbody>
@@ -27,7 +27,10 @@
27
27
  <th><%= index + 1 %></th>
28
28
  <td><%= name.camelize %></td>
29
29
  <td><%= model.reflections[name].macro %></td>
30
- <td><%= model.reflections[name].foreign_key %></td>
30
+ <td>
31
+ <%= model.reflections[name].options[:class_name] %>
32
+ <%= ", through: #{model.reflections[name].options[:through].to_s.capitalize}" if model.reflections[name].options[:through] %>
33
+ </td>
31
34
  </tr>
32
35
  <% end %>
33
36
  </tbody>
data/rails-erd-d3.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  spec.name = "rails-erd-d3"
7
7
  spec.authors = ["Roman Krasavtsev"]
8
8
  spec.email = ["mr.krasavtsev@gmail.com"]
9
- spec.version = "0.4.2"
9
+ spec.version = "0.4.3"
10
10
  spec.summary = "Entity–relationship diagram with D3.js for Rails application"
11
11
  spec.description = "This gem creates entity–relationship diagram with D3.js for your Rails application"
12
12
  spec.homepage = "https://github.com/RomanKrasavtsev/rails-erd-d3"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-erd-d3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Krasavtsev