Skip to content

Commit

Permalink
Merge pull request #61 from rickx/patch-1
Browse files Browse the repository at this point in the history
Update favourite_projects_menu_patch.rb
  • Loading branch information
syntacticvexation committed Feb 3, 2017
2 parents ecb9e21 + 4c6411a commit 1e2746f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/favourite_projects_menu_patch.rb
Expand Up @@ -23,10 +23,19 @@ def render_menu_with_favourite_projects(menu, project=nil)
links << link_to(fav.project.name, fav.project, :class => 'icon icon-projects')
end

links.empty? ? nil : content_tag('ul', links.join.html_safe)
#links.empty? ? nil : content_tag('ul', links.join.html_safe)
unless links.empty?
content_tag(:ul, :class => '') do
links.collect do |x|
content_tag(:li, x)
end.join.html_safe
end
end


else
render_menu_without_favourite_projects(menu, project)
end
end
end
end
end

0 comments on commit 1e2746f

Please sign in to comment.