wonder_navigation 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 5ca4bc76bc44b679073fd91deae81f09045296fe
4
- data.tar.gz: 0bee60511910d014f6053a23e7dac46412eb03a7
3
+ metadata.gz: 3e7daa1568fe39445faa6acfc1d05485fde6eed1
4
+ data.tar.gz: 7b2431f07058c3bf0961bcb743355330669cedfd
5
5
  SHA512:
6
- metadata.gz: 700d2603afda969f73ec5ee7e986d31702e179bc7005f88d4a777dc1c506eee52a1c3cf00ea1e09aa1359282b7d91065c89cb645604211836f39bd17972f28f2
7
- data.tar.gz: 906921d8d34e8fc8fa18cd112fc2c5ad3b66b6c76431b44da709739c9323b5a4a3e3df6987274ff2f5cff6da8464cc709b435eeb5aa9b3f10b9d071d15d6aff8
6
+ metadata.gz: 58ffe0eaf18102a7e6be74054011d0d1e080a1563c854b8d55f8768c996cee42d2f02bdccf68eee536ede903cfd35562c06909d2cd9a3604087a6caca87d9612
7
+ data.tar.gz: e3e9e9a15f88d68069b469401cb16e4df98640bd52fa9a598a7a30659aef7ddacbd53cf69b36725ccf7fac9e81d2e2c862b5c3b4fa4b1842d74a11e61b942723
@@ -3,6 +3,7 @@ module WonderNavigation
3
3
 
4
4
  def self.included(controller)
5
5
  controller.before_action :set_default_wonder_navigation_page
6
+ controller.before_action :set_current_wonder_navigation_menu
6
7
  end
7
8
 
8
9
  def set_default_wonder_navigation_page
@@ -14,6 +15,10 @@ module WonderNavigation
14
15
  set_navigation_page "#{controller_path.tr('/','_')}_#{page_action}"
15
16
  end
16
17
 
18
+ def set_current_wonder_navigation_menu(current_menu = :default)
19
+ @current_menu = current_menu
20
+ end
21
+
17
22
  def set_wonder_navigation_object(navigation_object)
18
23
  @navigation_object = navigation_object
19
24
  end
@@ -2,12 +2,12 @@ module WonderNavigation
2
2
  module Helper
3
3
 
4
4
  def navigation_breadcrumb
5
- crumbs = crumbs_for_current_page
5
+ crumbs = crumbs_for_current_page(@current_menu)
6
6
  crumbs.any? ? breadcrumb(crumbs) : "Breadcrumb undefined for '#{@navigation_page}'"
7
7
  end
8
8
 
9
9
  def navigation_title_breadcrumb(prefix)
10
- crumbs = crumbs_for_current_page.collect(&:label)
10
+ crumbs = crumbs_for_current_page(@current_menu).collect(&:label)
11
11
  crumbs[0] = prefix
12
12
  crumbs.join(" - ")
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module WonderNavigation
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wonder_navigation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Lise
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-05-05 00:00:00.000000000 Z
12
+ date: 2017-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -142,9 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.4.8
145
+ rubygems_version: 2.5.2
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Rails Wonderful Navigation
149
149
  test_files: []
150
- has_rdoc: