semantic_navigation 0.0.4 → 0.0.5

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.
@@ -1,3 +1,7 @@
1
+ ### 0.0.5 /Januarry 7th, 2012
2
+
3
+ * Bugfix for levels render
4
+
1
5
  ### 0.0.4 / Januarry 6th, 2012
2
6
 
3
7
  * Added helper method wrapping the level 1 (root) render
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  This is semantic_navigation
2
2
 
3
- Current version: 0.0.4
3
+ Current version: 0.0.5
4
4
 
5
5
  ###Purpose
6
6
  The purpose of this gem is to generate simple and usefull navigation. You can define different menus and render them separately, specify root nodes, setup your own renderers and other.
@@ -58,6 +58,7 @@ module SemanticNavigation
58
58
  def render_levels levels
59
59
  levels = levels.to_a
60
60
  item = find_active_item
61
+ return nil if item.nil?
61
62
  while item.level > levels.first-1 && item.level != 0
62
63
  item = item.parent
63
64
  end
@@ -66,6 +67,7 @@ module SemanticNavigation
66
67
 
67
68
  def render_from level_num
68
69
  item = find_active_item
70
+ return nil if item.nil?
69
71
  while item.level > level_num-1 && item.level != 0
70
72
  item = item.parent
71
73
  end
@@ -1,3 +1,3 @@
1
1
  module SemanticNavigation
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic_navigation
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergey Gribovski
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-06 00:00:00 Z
18
+ date: 2012-01-07 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec