Module: Lookbook::ApplicationHelper
- Defined in:
- app/helpers/lookbook/application_helper.rb
Instance Method Summary collapse
- #asset_path(file, version: true) ⇒ Object
- #config ⇒ Object
- #feature_enabled?(name) ⇒ Boolean
- #generate_id(*args) ⇒ Object
- #landing_path ⇒ Object
- #theme ⇒ Object
Instance Method Details
#asset_path(file, version: true) ⇒ Object
11 12 13 14 |
# File 'app/helpers/lookbook/application_helper.rb', line 11 def asset_path(file, version: true) path = "/lookbook-assets/#{file}".gsub("//", "/") version ? "#{path}?v=#{Lookbook::VERSION}" : path end |
#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
16 17 18 |
# File 'app/helpers/lookbook/application_helper.rb', line 16 def feature_enabled?(name) Lookbook::Features.enabled?(name) end |
#generate_id(*args) ⇒ Object
29 30 31 |
# File 'app/helpers/lookbook/application_helper.rb', line 29 def generate_id(*args) args.map { |args| args.delete_prefix("/").tr("&?=/_-", "-") }.join("-") end |