app/helpers/application_helper.rb
# Generate the list by tree of Gallery in sidebar
Generate the list by tree of Gallery in sidebar
Generate the list by tree of Gallery in sidebar
def tree_gallery(gallery)
    str = ""
    if @gallery == gallery || @gallery.ancestors.include?(gallery)
      str = "<ul>"
      gallery.children.each do |gallery_child|
        str += "<li>"
        str += link_gallery_with_number(gallery_child)
        str += tree_gallery(gallery_child)
        str += "</li>"
      end
      str += "</ul>"
    end
    str
  end
def tree_gallery ( gallery ) str = "" if @gallery == gallery || @gallery . ancestors . include? ( gallery ) str = "<ul>" gallery . children . each do | gallery_child | str += "<li>" str += link_gallery_with_number ( gallery_child ) str += tree_gallery ( gallery_child ) str += "</li>" end str += "</ul>" end str end
Generate the list by tree of Gallery in sidebar
Generate the list by tree of Gallery in sidebar
gallery
<not_specific>