recourse 5.11.0 → 5.11.1
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 +4 -4
- data/lib/recourse/helpers/parents.rb +6 -2
- data/lib/recourse/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0d0a9559b9beb31ba0248496c25768770853e6b80fd35f239d6ed94f83c57436
|
|
4
|
+
data.tar.gz: 840d0a43342c2bc0f240af61f3a1288f4bef3f69816bc4a86f4959681194526a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 66e44ef019faad1490c8a89943c3564700507c67a237e85e9d32602555c65734f997b9b69b76714d4d18b308b6d6d13ffdcfe2904bc4144ec00976d0ba49146c
|
|
7
|
+
data.tar.gz: 2ba50a0f91eeacfc93877a7283820b9a1a9cf648412ba0b6591d58905e92f7e3dbc3e9dcf0507ece071d421179b7cfcbd235c057d6666f92046420cf41238b30
|
|
@@ -32,9 +32,13 @@ module Recourse
|
|
|
32
32
|
# record's crumb links to its show page, where one is routed to link to.
|
|
33
33
|
def parent_breadcrumbs
|
|
34
34
|
parent = resource_parent
|
|
35
|
-
|
|
35
|
+
path = Recourse.parent_of controller.controller_path if parent
|
|
36
|
+
# A host may nest a page with Rails' own `resource`, which records nothing here:
|
|
37
|
+
# the page is still under a record and still knows which one, and only where the
|
|
38
|
+
# parent's own pages live is unknown. Its crumbs are what is dropped, rather than
|
|
39
|
+
# the page they would have stood over.
|
|
40
|
+
return [] unless path
|
|
36
41
|
|
|
37
|
-
path = Recourse.parent_of controller.controller_path
|
|
38
42
|
[
|
|
39
43
|
[path, Recourse.title(path), parent_url(path, :index)],
|
|
40
44
|
[nil, parent_title(parent), parent_url(path, :show, id: parent)],
|
data/lib/recourse/version.rb
CHANGED