breadcrumbs_for 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/breadcrumbs_for.gemspec +1 -1
- data/lib/breadcrumbs_for.rb +3 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/breadcrumbs_for.gemspec
CHANGED
data/lib/breadcrumbs_for.rb
CHANGED
@@ -75,7 +75,7 @@ module BreadcrumbsFor
|
|
75
75
|
when 'Symbol' # Is a namespace. Skip it
|
76
76
|
crumb_to_caption(crumb.last)
|
77
77
|
when 'String' # Is an action name. Use it
|
78
|
-
string_to_caption(crumb.first) << ' ' <<
|
78
|
+
string_to_caption(crumb.first) << ' ' << crumb_caption(crumb.last)
|
79
79
|
else # Use last item only
|
80
80
|
cramb_to_caption(crumb.last)
|
81
81
|
end
|
@@ -95,11 +95,11 @@ module BreadcrumbsFor
|
|
95
95
|
when 'Hash'
|
96
96
|
crumb.delete(:crumb)
|
97
97
|
else
|
98
|
-
|
98
|
+
crumb_caption(crumb)
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
|
-
def
|
102
|
+
def crumb_caption obj, method='name'
|
103
103
|
[method,'name','title'].each do |name_method|
|
104
104
|
if obj.respond_to?(name_method)
|
105
105
|
was_method = "#{name_method}_was"
|