auto_breadcrumbs 0.2.6 → 0.2.7
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/auto_breadcrumbs/controller.rb +5 -3
- data/lib/auto_breadcrumbs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5f47820303623b48f4d748c007ffe6713103ba21
|
|
4
|
+
data.tar.gz: df793fd159ca98d4fdf9b2174e2328ce1c999c3d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 382059adb923f5bc3f2b6e1483d698aa69ff71997a16cf356b7ac11fd77b420981cdb622735e81ee82cc02e1410954d074014692b9bc60462ffc168eb5ab2a37
|
|
7
|
+
data.tar.gz: e7f73f93b53bfb50234844c27cf6dc88edd95807348006e47805ab045c1d76b5db729031dba189c7f4ecc031fd83575c7f1b34f6edbf4267a59935871b878dd7
|
|
@@ -17,14 +17,16 @@ module AutoBreadcrumbs
|
|
|
17
17
|
add_breadcrumb breadcrumbs_t('root'), :root_path
|
|
18
18
|
|
|
19
19
|
unless request.path == root_path
|
|
20
|
-
add_breadcrumb(resource_translation, index_path) if
|
|
20
|
+
add_breadcrumb(resource_translation, index_path) if resource_translation
|
|
21
21
|
add_breadcrumb(action_translation) if action_translation
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def resource_translation
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
if index_path
|
|
27
|
+
breadcrumbs_t("controllers.#{ params[:controller] }.index") ||
|
|
28
|
+
params[:controller].humanize
|
|
29
|
+
end
|
|
28
30
|
end
|
|
29
31
|
|
|
30
32
|
def action_translation
|