crummy 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +3 -12
- data/VERSION +1 -1
- data/lib/crummy.rb +1 -1
- data/lib/crummy/standard_renderer.rb +2 -2
- metadata +2 -2
data/README.textile
CHANGED
@@ -10,17 +10,7 @@ Simply add the dependency to your Gemfile:
|
|
10
10
|
|
11
11
|
<pre>
|
12
12
|
<code>
|
13
|
-
gem "crummy", "~> 1.
|
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.
|
1
|
+
1.6.0
|
data/lib/crummy.rb
CHANGED
@@ -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
|
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
|
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.
|
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-
|
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
|