Commit de523447654ce521c53e9ed202cd4ccd8b49ff36

Authored by Rafael Reggiani Manzo
1 parent 6d28dbeb

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.
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