zen_breadcrumbs 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c2d9920e48ea2ffb731b295ceeaa937bde1fd56
4
- data.tar.gz: 6d778f01cb1a8b330142029f6b488f6ee5def721
3
+ metadata.gz: 20cf1c8906bc8641cf4790671f4312304b29ecb5
4
+ data.tar.gz: 1ee32e23750ae9ca4c1e461789f1120e7717f618
5
5
  SHA512:
6
- metadata.gz: 3a826589b4da48e07b689efb51bd149c489b5e2d514bdc5f6a7701ef6a8a3a8582cc15625fc36ae095769fa41a56f00f4029d70cc25892cddbd2d63ad2091928
7
- data.tar.gz: 958ab48b2eb90d41fdcb0916a4bf18aab0c68e1c46fe7b98bd317b730865915f0fcef8066ff08b33df50587b4170321d6b83dc00b1ba233b835d8673e9a13ac1
6
+ metadata.gz: f8f96dc8c7c0130fac0e0a35f948f96a705aa9495852e9ce620e5ca36c882abcc51136072414abcc9f3433ec3ba30dbd0948f66777d606acc5c9a3237be56928
7
+ data.tar.gz: 283fa4a16265aef07771957af33fe5982538a04067c54876ebe2f488fb3ce2822521e147cd0c903f4474410c5ef27c399ee50ff405b92a3159bbaafe0ebb36c0
@@ -1,21 +1,13 @@
1
1
  module ZenBreadcrumbs
2
2
 
3
3
  module Breadcrumbs
4
- extend ActiveSupport::Concern
4
+ def breadcrumbs(titles, urls, options = {})
5
+ css_prefix = options[:css_prefix] || 'breadcrumbs'
5
6
 
6
- included do
7
- helper HelperMethods
8
- end
9
-
10
- module HelperMethods
11
- def breadcrumbs(titles, urls, options = {})
12
- css_prefix = options[:css_prefix] || 'breadcrumbs'
13
-
14
- content_tag :ol, class: "#{css_prefix}-box" do
15
- titles.each_with_index do |title, i|
16
- concat content_tag :li, (link_to_if urls[i], title, urls[i], class: "#{css_prefix}-link"), class: "#{css_prefix}-list"
17
- concat content_tag :span, options[:separator] || ">", class: "#{css_prefix}-separator" if i < titles.size-1
18
- end
7
+ content_tag :ol, class: "#{css_prefix}-box" do
8
+ titles.each_with_index do |title, i|
9
+ concat content_tag :li, (link_to_if urls[i], title, urls[i], class: "#{css_prefix}-link"), class: "#{css_prefix}-list"
10
+ concat content_tag :span, options[:separator] || ">", class: "#{css_prefix}-separator" if i < titles.size-1
19
11
  end
20
12
  end
21
13
  end
@@ -1,7 +1,7 @@
1
1
  module ZenBreadcrumbs
2
2
  class Railtie < Rails::Railtie
3
3
  initializer 'zen_breadcrumbs.initialize' do
4
- ActiveSupport.on_load(:action_controller) do
4
+ ActiveSupport.on_load(:action_view) do
5
5
  include Breadcrumbs
6
6
  end
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module ZenBreadcrumbs
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zen_breadcrumbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-25 00:00:00.000000000 Z
11
+ date: 2014-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails