Sha256: 0f50f7e96c999ce00314828ca0b5dc2c99294bb8149cd21da68b81d38b3f1506
Contents?: true
Size: 531 Bytes
Versions: 46
Compression:
Stored size: 531 Bytes
Contents
module Caboose module PagesHelper def pages_list(page) str = "<ul>" str << pages_list_helper(page) str << "</ul>" return str end def pages_list_helper(page) str = "<li><a href='/admin/pages/#{page.id}/edit'>#{page.title}</a>" if page.children && page.children.count > 0 str << "<ul>" page.children.each do |p| str << pages_list_helper(p) end str << "</ul>" end str << "</li>" return str end end end
Version data entries
46 entries across 46 versions & 1 rubygems