Sha256: 52160bbb6bb7357c96c2322cdf5c14876551b5069b78ac4c90edd31494a7581b

Contents?: true

Size: 368 Bytes

Versions: 12

Compression:

Stored size: 368 Bytes

Contents

module ConstructorPages
  module PagesHelper
    def for_select(roots)
      result = []
      roots.each do |r|
        r.self_and_descendants.each {|i| result.push(["#{'--'*i.level} #{i.name}", i.id, {'data-full_url' => i.full_url}])}
      end
      result
    end

    def templates
      Template.all.map{|t| ["#{'--'*t.level} #{t.name}", t.id]}
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
constructor-pages-0.2.11 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.10 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.9 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.8 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.7 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.6 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.5 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.4 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.3 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.2 app/helpers/constructor_pages/pages_helper.rb
constructor-pages-0.2.1 app/helpers/constructor_pages/pages_helper.rb
constructor-cms-0.2.1 pages/app/helpers/constructor_pages/pages_helper.rb