lib/menu_builder/helper.rb in menu_builder-0.2.1 vs lib/menu_builder/helper.rb in menu_builder-0.3.0

- old
+ new

@@ -16,18 +16,10 @@ @context.content_tag :li, @context.link_to(*args, &block), :class=>css_class end end - def menu(options={}) - concat tag(:ul, options, true) - yield Menu.new(self) - concat safe_html("</ul>") + def menu(options={}, &block) + content_tag :ul, capture(Menu.new(self), &block), options end - - private - def safe_html(html) - html.respond_to?(:html_safe) ? html.html_safe : html - end - end end \ No newline at end of file