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.1.1 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.1.0 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.33 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.31 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.30 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.29 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.28 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.27 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.26 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.25 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.24 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.23 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.22 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.21 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.20 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.19 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.18 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.17 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.16 app/helpers/brightcontent/pages_helper.rb
brightcontent-pages-2.0.15 app/helpers/brightcontent/pages_helper.rb