merb-breadcrumbs 0.2.1 → 0.2.3
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.
- data/VERSION +1 -1
- data/lib/merb-breadcrumbs/controller_mixin.rb +8 -2
- data/merb-breadcrumbs.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
@@ -17,7 +17,7 @@ module Merb
|
|
17
17
|
def action_crumb
|
18
18
|
crumb_function = self.class.action_crumbs[action_name.to_sym]
|
19
19
|
case crumb_function
|
20
|
-
when Symbol then
|
20
|
+
when Symbol then self.send(crumb_function)
|
21
21
|
when String then push_crumb(crumb_function)
|
22
22
|
when Array then push_crumb(*crumb_function)
|
23
23
|
end
|
@@ -27,8 +27,14 @@ module Merb
|
|
27
27
|
|
28
28
|
# Convenience method for laying a trail of breadcrumbs
|
29
29
|
def breadcrumb_trail(*args)
|
30
|
+
options = if args.last.respond_to?(:each_pair)
|
31
|
+
args.pop
|
32
|
+
else
|
33
|
+
{}
|
34
|
+
end
|
35
|
+
|
30
36
|
args.each do |arg|
|
31
|
-
send(:before, "#{arg}_crumb".to_sym)
|
37
|
+
send(:before, "#{arg}_crumb".to_sym, options)
|
32
38
|
end
|
33
39
|
end
|
34
40
|
|
data/merb-breadcrumbs.gemspec
CHANGED