$ -> path = "/#{$('body').data('app-name')}/body.html" name = $('body').data('app-name') $.ajax "/"+name+"/options.json" cache: false success: (data) -> data.menu = [] unless data.menu for m in data.menu console.log m el = $("
  • " class: 'dropdown' ) a = $("" href: "#" "class":"dropdown-toggle" "data-toggle":"dropdown" html: m.name ) el.append(a) if m.submenu.length ul = $("