navigator_rails 0.0.8 → 0.0.9

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: 67b1c5f2e4f7e6ca51232e75777ef44ab21d359c
4
- data.tar.gz: 168a0cd8bae2fcaca67a26dfac4175d206a4049c
3
+ metadata.gz: 07f9ecac826bb990e7d3bd06da5ff06a5fab81c1
4
+ data.tar.gz: 89abfe33bac1ffa334a02b1219154a4456eb89e2
5
5
  SHA512:
6
- metadata.gz: bf3437be8268b16e53eae146316fc9923156c500ef56812605ac8f876c3cbf6c52ef7f9b7733437b979159561931b2345732378c002847eb3577f9a97cfe4a06
7
- data.tar.gz: 3a6ce1b59fcb68b2f1a78f1198981132d5ea9775f68e99e8ea81ceb6746f9a663d404c2d622df8c381f0a2b5f58455eae727b3aaf08eaf926224d2f20fd34e50
6
+ metadata.gz: a92fd10b937c10343596c20a2e3e7bed494b784b5a57390ebe0c01489097e16e3dc7923bd8a2530996834ab6a29a7f9e1eab19d60fe456719f9876d8d683fa12
7
+ data.tar.gz: 7e30aec38b8b92fd5b0ccc67d9be3a380db829a9a3106c344dbecd88b931859b5555f8ba8decd3f2bf7a8c0eb0bb772ca460b8aacda81e7fb8aa1799c7d1fcd5
@@ -19,11 +19,13 @@ module NavigatorRails
19
19
  resource.children.count
20
20
  end
21
21
  def has_visible_children
22
- children = resource.children
23
- return false if children.empty?
24
- children.collect do |child|
25
- child.constraint
26
- end.reduce(:|)
22
+ begin
23
+ children.collect do |child|
24
+ child.constraint
25
+ end.reduce(:|)
26
+ rescue NoMethodError
27
+ false
28
+ end
27
29
  end
28
30
  def children_except params={}
29
31
  resource.children_except(params)
@@ -1,3 +1,3 @@
1
1
  module NavigatorRails
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navigator_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - mathias Kaufmann