Guest User

Untitled

a guest
Jul 11th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. module ApplicationHelper
  2. def render_site_menu(menu= :site_menu, project=nil)
  3. links = []
  4. menu_items_for(menu, project) do |item, caption, url, selected|
  5. links << content_tag('li',
  6. link_to(h(caption), url), item.html_options(:selected => selected))
  7. end
  8. links.empty? ? nil : content_tag('ul', links.join("\n"))
  9. end
  10. end
Add Comment
Please, Sign In to add comment