Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def menu(options = {}, &block)
- carte = my_menu.new(self)
- yield carte
- carte.to_s unless carte.empty?
- end
- class my_menu
- include ActionView::Helpers::TagHelper
- include ActionView::Helpers::UrlHelper
- def initialize(base)
- @base = base
- end
- def link
- @base.link_to(name, url_options, html_options)
- @base.current_page?(url_options)
- end
- end
- included ActionView::Helpers::UrlHelper
Add Comment
Please, Sign In to add comment