auto_breadcrumbs 0.2.6 → 0.2.7

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: 21148064719659497857c84c555063f778f85bb8
4
- data.tar.gz: 7c68a6cdd06b376532a8d791fab5b41dbc072dc2
3
+ metadata.gz: 5f47820303623b48f4d748c007ffe6713103ba21
4
+ data.tar.gz: df793fd159ca98d4fdf9b2174e2328ce1c999c3d
5
5
  SHA512:
6
- metadata.gz: 23f2fab71651cd09aec0bc0697ccabdec8271d5cd059da9786b97e06db36d34df1570b94bc1032792a929bd4047130ee233aa1563b1881b29825fb924a29acc5
7
- data.tar.gz: 645773a0715760f57ed935afc1714f991ac33940009b680bc34e85e25a9bb576172676856fffee87f8df8b18a5a0baf14b6acd66e65e9951a4a2f9deb2938d35
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 index_path
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
- breadcrumbs_t("controllers.#{ params[:controller] }.index") ||
27
- params[:controller].humanize
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
@@ -1,3 +1,3 @@
1
1
  module AutoBreadcrumbs
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_breadcrumbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Li