def nav_li *args, &block
      options = (block_given? ? args.first : args.second) || {}
      url = url_for(options)
      active = "active" if url == request.path || url == request.url
      content_tag :li, :class => active do
        link_to *args, &block
      end
    end
def nav_li *args, &block
      options = (block_given? ? args.first : args.second) || {}
      url = url_for(options)
      active = "active" if url == request.path || url == request.url
      content_tag :li, :class => active do
        link_to *args, &block
      end
    end
Just like +link_to+, but wrap with li tag and set +class="active"+
 to corresponding page.