Commit de523447654ce521c53e9ed202cd4ccd8b49ff36
1 parent
6d28dbeb
Exists in
staging
and in
29 other branches
Fix BreadcrumbsPluginHelper#trail
Whenever calling page_trail it was pushin a new array inside the existing one while the desired behaviour is to merge them.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
plugins/breadcrumbs/lib/breadcrumbs_plugin_helper.rb
@@ -21,9 +21,9 @@ module BreadcrumbsPluginHelper | @@ -21,9 +21,9 @@ module BreadcrumbsPluginHelper | ||
21 | def trail(block, page, profile=nil, params={}) | 21 | def trail(block, page, profile=nil, params={}) |
22 | links = [] | 22 | links = [] |
23 | if page | 23 | if page |
24 | - links << page_trail(page) | 24 | + links += page_trail(page) |
25 | elsif params[:controller] == 'cms' && (id = params[:id] || params[:parent_id]) | 25 | elsif params[:controller] == 'cms' && (id = params[:id] || params[:parent_id]) |
26 | - links << page_trail(Article.find(id)) | 26 | + links += page_trail(Article.find(id)) |
27 | if block.show_cms_action | 27 | if block.show_cms_action |
28 | links << { :name => action(params[:action]), :url => params } | 28 | links << { :name => action(params[:action]), :url => params } |
29 | end | 29 | end |