Sha256: a664a90230388f79a2d707695a30bb238c520b62f509dcb6795740d35b89fc10

Contents?: true

Size: 450 Bytes

Versions: 8

Compression:

Stored size: 450 Bytes

Contents

module Lookbook
  module ApplicationHelper
    def config
      Lookbook::Engine.config.lookbook
    end

    def feature_enabled?(name)
      Lookbook::Features.enabled?(name)
    end

    def landing_path
      landing = feature_enabled?(:pages) ? Lookbook.pages.find(&:landing) || Lookbook.pages.first : nil
      if landing.present?
        lookbook_page_path landing.lookup_path
      else
        lookbook_home_path
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lookbook-0.9.8 app/helpers/lookbook/application_helper.rb
lookbook-0.9.7 app/helpers/lookbook/application_helper.rb
lookbook-0.9.6 app/helpers/lookbook/application_helper.rb
lookbook-0.9.5 app/helpers/lookbook/application_helper.rb
lookbook-0.9.4 app/helpers/lookbook/application_helper.rb
lookbook-0.9.3 app/helpers/lookbook/application_helper.rb
lookbook-0.9.2 app/helpers/lookbook/application_helper.rb
lookbook-0.9.1 app/helpers/lookbook/application_helper.rb