breadcrumble 3.0.3 → 3.0.4
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.
data/README.md
CHANGED
@@ -45,8 +45,8 @@ If you would like to use multiple breadcrumb, call `add_breadcrumb_to` method wi
|
|
45
45
|
add_breadcrumb_to "level 2", "level 2 url", 1
|
46
46
|
|
47
47
|
def index
|
48
|
-
|
49
|
-
|
48
|
+
add_breadcrumb_to "level 1 second item", "level 1 second url", 0
|
49
|
+
add_breadcrumb_to "level 2 second item", "level 2 second url", 1
|
50
50
|
end
|
51
51
|
|
52
52
|
### View
|
@@ -71,6 +71,9 @@ Generate template. Run the follwoing.
|
|
71
71
|
|
72
72
|
then edit the partials in your app's `app/views/breadcrumble/` directory.
|
73
73
|
|
74
|
+
## Live Demo
|
75
|
+
<http://breadcrumble.herokuapp.com/>
|
76
|
+
|
74
77
|
## Contributing
|
75
78
|
|
76
79
|
1. Fork it
|
@@ -7,14 +7,14 @@ module Breadcrumble
|
|
7
7
|
end
|
8
8
|
|
9
9
|
module ClassMethods
|
10
|
-
def add_breadcrumb name, url = nil
|
10
|
+
def add_breadcrumb name, url = nil, filter_options = {}
|
11
11
|
before_filter do |controller|
|
12
12
|
controller.send :add_breadcrumb, name, url
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
def add_breadcrumb_to name, url, trail_index
|
17
|
-
before_filter do |controller|
|
16
|
+
def add_breadcrumb_to name, url, trail_index, filter_options = {}
|
17
|
+
before_filter(filter_options) do |controller|
|
18
18
|
controller.send :add_breadcrumb_to, name, url, trail_index
|
19
19
|
end
|
20
20
|
end
|
data/lib/breadcrumble/version.rb
CHANGED
@@ -4,8 +4,8 @@ describe ApplicationController do
|
|
4
4
|
controller do
|
5
5
|
add_breadcrumbs ['root', '/'], ['nil', nil]
|
6
6
|
add_breadcrumb -> c { c.examples_url }, -> c { c.examples_path }
|
7
|
-
add_breadcrumb_to -> c { c.examples_url }, -> c { c.examples_path }, 1
|
8
|
-
add_breadcrumb_to 'multi third 1', 'multi third url 1', 2
|
7
|
+
add_breadcrumb_to -> c { c.examples_url }, -> c { c.examples_path }, 1, only: :show
|
8
|
+
add_breadcrumb_to 'multi third 1', 'multi third url 1', 2, only: :show
|
9
9
|
|
10
10
|
def index
|
11
11
|
add_breadcrumb 'examples', controller: 'examples', action: 'index', only_path: true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: breadcrumble
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
segments:
|
129
129
|
- 0
|
130
|
-
hash:
|
130
|
+
hash: -696448938545862110
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
132
|
none: false
|
133
133
|
requirements:
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash:
|
139
|
+
hash: -696448938545862110
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
142
|
rubygems_version: 1.8.23
|