crummy 1.5.0 → 1.6.0

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.
@@ -10,17 +10,7 @@ Simply add the dependency to your Gemfile:
10
10
 
11
11
  <pre>
12
12
  <code>
13
- gem "crummy", "~> 1.5.0"
14
- </code>
15
- </pre>
16
-
17
- h3. Rails 2
18
-
19
- In your terminal, write:
20
-
21
- <pre>
22
- <code>
23
- gem install crummy
13
+ gem "crummy", "~> 1.6.0"
24
14
  </code>
25
15
  </pre>
26
16
 
@@ -94,6 +84,7 @@ h3. Examples
94
84
  render_crumbs :format => :html_list #=> <ul class="" id=""><li class=""><a href="/">Home</a></li><li class=""><a href="/">Businesses</a></li></ul>
95
85
  </code>
96
86
  </pre>
87
+
97
88
  A crumb with a nil argument for the link will output an unlinked crumb.
98
89
 
99
90
  With :format => :html_list you can specify additional params: :active_li_class, :li_class, :ul_class, :ul_id
@@ -114,7 +105,7 @@ Insert the following in a file named @config/initializers/crummy.rb@:
114
105
  </code>
115
106
  </pre>
116
107
 
117
- Possible parameters for configuration are:
108
+ Possible parameters for configuration are:
118
109
 
119
110
  <pre>
120
111
  <code>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.0
1
+ 1.6.0
@@ -24,7 +24,7 @@ module Crummy
24
24
 
25
25
  def initialize
26
26
  @format = :html
27
- @html_separator = " &raquo; "
27
+ @html_separator = " &raquo; ".html_safe
28
28
  @xml_separator = "crumb"
29
29
  @html_list_separator = ''
30
30
  @skip_if_blank = true
@@ -39,7 +39,7 @@ module Crummy
39
39
  when :html
40
40
  crumb_string = crumbs.collect do |crumb|
41
41
  crumb_to_html(crumb, options[:links], options[:first_class], options[:last_class], (crumb == crumbs.first), (crumb == crumbs.last))
42
- end * options[:separator]
42
+ end.reduce { |memo, obj| memo << options[:separator] << obj }
43
43
  crumb_string
44
44
  when :html_list
45
45
  # Let's set values for special options of html_list format
@@ -49,7 +49,7 @@ module Crummy
49
49
  options[:ul_id] ||= Crummy.configuration.ul_id
50
50
  crumb_string = crumbs.collect do |crumb|
51
51
  crumb_to_html_list(crumb, options[:links], options[:li_class], options[:active_li_class], options[:first_class], options[:last_class], (crumb == crumbs.first), (crumb == crumbs.last))
52
- end * options[:separator]
52
+ end.reduce { |memo, obj| memo << options[:separator] << obj }
53
53
  crumb_string = content_tag(:ul, crumb_string, :class => options[:ul_class], :id => options[:ul_id])
54
54
  crumb_string
55
55
  when :xml
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crummy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-07 00:00:00.000000000Z
12
+ date: 2012-05-15 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Crummy is a simple and tasty way to add breadcrumbs to your Rails applications.
15
15
  email: zach+crummy@londonmade.co.uk