middleman-breadcrumbs 0.0.2 → 0.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72ea8c2165ff420bbc4783888895bc4111c7c088
|
4
|
+
data.tar.gz: a6fb2b6bb868589974144835957f6f912832ac51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8acc1fc4079d27d82a57b40a47f9db77ad1d37de926ab5c2fc44ce0a933f3e643d21bec35c4aee33ccb374c4461b780be4849546276b309f428b4a6dc3874775
|
7
|
+
data.tar.gz: 5d67302b8dd2d037c6524f9468d17efccd1de2f9aae9800c3f31126f754593c182caa913013b2103e417ec287fe901df771ad55b67e890b57b1d921cdc949353
|
@@ -6,6 +6,6 @@ module BreadcrumbsHelper
|
|
6
6
|
def breadcrumbs(page)
|
7
7
|
hierarchy = [page]
|
8
8
|
hierarchy.unshift hierarchy.first.parent while hierarchy.first.parent
|
9
|
-
hierarchy.collect {|page| link_to page.data.title, page.path }.join(h ' > ')
|
9
|
+
hierarchy.collect {|page| link_to page.data.title, "/#{page.path}" }.join(h ' > ')
|
10
10
|
end
|
11
11
|
end
|
@@ -1,2 +1,2 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'breadcrumbs')
|
2
|
-
Breadcrumbs::VERSION = '0.0.
|
2
|
+
Breadcrumbs::VERSION = '0.0.3'
|
@@ -16,7 +16,7 @@ describe BreadcrumbsHelper do
|
|
16
16
|
|
17
17
|
describe 'top-level page' do
|
18
18
|
it 'returns a link to the page' do
|
19
|
-
@helper.breadcrumbs(@page).must_equal link_to(@page.data.title, @page.path)
|
19
|
+
@helper.breadcrumbs(@page).must_equal link_to(@page.data.title, "/#{@page.path}")
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -28,7 +28,7 @@ describe BreadcrumbsHelper do
|
|
28
28
|
@page.parent.parent = grandparent
|
29
29
|
|
30
30
|
@helper.breadcrumbs(@page).must_equal([grandparent, parent, @page].collect do |level|
|
31
|
-
link_to level.data.title, level.path
|
31
|
+
link_to level.data.title, "/#{level.path}"
|
32
32
|
end.join ' > ')
|
33
33
|
end
|
34
34
|
end
|