Sha256: 5af002de3564fa7ccd709b7a8654c215bcadb7f1a83f4b86e7b5007a13d3c2a4

Contents?: true

Size: 282 Bytes

Versions: 39

Compression:

Stored size: 282 Bytes

Contents

module Brightcontent
  module PagesHelper
    def page_selector(current_page)
      Page.all.map do |page|
        ["#{page_prefix(page.depth)} #{page.name}", page.id] if page != current_page
      end.compact
    end

    def page_prefix(depth)
      "-" * depth
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
brightcontent-pages-2.0.14 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.13 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.12 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.11 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.10 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.9 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.8 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.7 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.6 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.5 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.3 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.2 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.1 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.0.alpha6 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.0.alpha5 app/helpers/brightcontent/pages_helper.rb
brightcontent-2.0.0.alpha3 pages/app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.0.alpha3 app/helpers/brightcontent/pages_helper.rb
brightcontent-2.0.0.alpha2 pages/app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-0.0.1 app/helpers/brightcontent/pages_helper.rb