Sha256: 1c31c681841f1d99e24e8317c3e4339fe49af28f51e3fd22f5d1101385a735bc

Contents?: true

Size: 450 Bytes

Versions: 8

Compression:

Stored size: 450 Bytes

Contents

module Lookbook
  module ApplicationHelper
    def lookbook_asset_path(file, version: true)
      path = "/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

8 entries across 8 versions & 1 rubygems

Version Path
lookbook-2.0.0.beta.7 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.beta.6 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.beta.5 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.beta.4 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.beta.3 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.beta.2 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.beta.1 app/helpers/lookbook/application_helper.rb
lookbook-2.0.0.beta.0 app/helpers/lookbook/application_helper.rb