Sha256: 18461292948f677f009222caac58fe1b95c40a4f3187f025bd17285344e13451

Contents?: true

Size: 489 Bytes

Versions: 17

Compression:

Stored size: 489 Bytes

Contents

module Lookbook
  module ApplicationHelper
    def lookbook_asset_path(file, version: true)
      path = "#{Engine.host_config.relative_url_root}/lookbook-assets/#{file}".gsub("//", "/")
      version ? "#{path}?v=#{Lookbook::VERSION}" : path
    end

    def lookbook_landing_path
      landing = Engine.pages.find(&:landing?) || Engine.pages.first
      if landing.present?
        lookbook_page_path landing.lookup_path
      else
        lookbook_home_path
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
lookbook-2.3.0 app/helpers/lookbook/application_helper.rb
lookbook-2.2.2 app/helpers/lookbook/application_helper.rb
lookbook-2.2.1 app/helpers/lookbook/application_helper.rb
lookbook-2.2.0 app/helpers/lookbook/application_helper.rb
lookbook-2.1.1 app/helpers/lookbook/application_helper.rb
lookbook-2.1.0 app/helpers/lookbook/application_helper.rb
lookbook-2.0.5 app/helpers/lookbook/application_helper.rb
lookbook-2.0.4 app/helpers/lookbook/application_helper.rb
lookbook-2.0.3 app/helpers/lookbook/application_helper.rb
lookbook-2.0.2 app/helpers/lookbook/application_helper.rb
lookbook-2.0.1 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.rc.3 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.rc.2 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.rc.1 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.beta.9 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.beta.8 app/helpers/lookbook/application_helper.rb