Module: Lookbook::ApplicationHelper
- Defined in:
- app/helpers/lookbook/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
3 4 5 |
# File 'app/helpers/lookbook/application_helper.rb', line 3 def config Lookbook::Engine.config.lookbook end |
#feature_enabled?(name) ⇒ Boolean
7 8 9 |
# File 'app/helpers/lookbook/application_helper.rb', line 7 def feature_enabled?(name) Lookbook::Features.enabled?(name) end |
#landing_path ⇒ Object
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? lookbook_page_path landing.lookup_path else lookbook_home_path end end |