dev_toolbar 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b5f82f64e412b3c84ead79dd80b612f52af3e45bb590fba94f24aafd148b1ef
4
- data.tar.gz: f6ad406e103b96573194853a79cb89f5b3dc4ed78e48bfd692112c8203168d7b
3
+ metadata.gz: 2c3346cbc6911631a8ab5f783fd8c3f1cce6aee3ff8347f8f733327fc2cdf2f5
4
+ data.tar.gz: dc5718868ec6d26a22f4c6c1dae9cbd7981afb3ea96b20f309b86f54106fd253
5
5
  SHA512:
6
- metadata.gz: 0f4289abfef772cad1b0ef858dfa760a77e3071e8fad8aa42e8ce348477fabb0575cd52d710388808e7ccfc3d24d504d43d21baee46fc540265aaa50e2de8c4d
7
- data.tar.gz: 70cbbfce13c9fa7c67edd150e4b429ef0d9a03477a47979553e2eabe48518181549888d234feb7d38c0ac2047fcf81b7000328a42fc3e96a0cf1f915791f0729
6
+ metadata.gz: e9248fce47ce7b823952f317c51634012df65d95e05f62f897c06771a969e2b374f4fcc8f337e7f5bacce69868976b44af561abff46086da1ead1e946ef50f36
7
+ data.tar.gz: 858c55b8fab494d9a6d60f928d28bdc3eb0bb44f51888ea25edde8af8a88631f1abbad6088b1932111d3e5b8474f7cd1a1998d822616d21a148004461a5ed8a9
@@ -81,8 +81,13 @@ module DevToolbar
81
81
 
82
82
  def toolbar_links
83
83
  DevToolbar.configuration.links.map do |link|
84
- "<a href='#{link[:path]}' target='_blank' class='dev-toolbar-link'>#{link[:name]}</a>"
85
- end.join(' ')
84
+ # if the erd.png file does not exist in /public, don't show the link
85
+ if link[:name] == "Data Model" && !File.exist?(Rails.public_path.join("erd.png"))
86
+ next
87
+ else
88
+ "<a href='#{link[:path]}' target='_blank' class='dev-toolbar-link'>#{link[:name]}</a>"
89
+ end
90
+ end.compact.join(" ")
86
91
  end
87
92
  end
88
93
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DevToolbar
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_toolbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Purinton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-11 00:00:00.000000000 Z
11
+ date: 2024-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails