Module: Lookbook::ApplicationHelper

Defined in:
app/helpers/lookbook/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#configObject



3
4
5
# File 'app/helpers/lookbook/application_helper.rb', line 3

def config
  Lookbook::Engine.config.lookbook
end

#feature_enabled?(name) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'app/helpers/lookbook/application_helper.rb', line 7

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

#landing_pathObject



11
12
13
14
15
16
17
18
# File 'app/helpers/lookbook/application_helper.rb', line 11

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