Module: ConstructorPages::TemplatesHelper
- Defined in:
- pages/app/helpers/constructor_pages/templates_helper.rb
Instance Method Summary collapse
Instance Method Details
#for_select(roots) ⇒ Object
3 4 5 6 7 8 9 |
# File 'pages/app/helpers/constructor_pages/templates_helper.rb', line 3 def for_select(roots) result = [] roots.each do |r| r.self_and_descendants.each {|i| result.push(["#{'--'*i.level} #{i.name}", i.id])} end result end |