Sha256: bf0c1216a83010a3b48475689442c2b3baf0d452087ebc622d72e1326a252bb8

Contents?: true

Size: 386 Bytes

Versions: 9

Compression:

Stored size: 386 Bytes

Contents

module Lookbook
  # Set of helpers for preview layouts
  #
  # @api public
  module PreviewHelper
    def lookbook_display(key, fallback = nil)
      params.dig(:lookbook, :display, key.to_sym) || fallback
    end

    def lookbook_data(key, fallback = nil)
      Lookbook.data.fetch(key.to_sym, fallback)
    end

    def url_for(*args)
      main_app.url_for(*args)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lookbook-2.0.0.rc.1 lib/lookbook/helpers/preview_helper.rb
lookbook-2.0.0.beta.9 lib/lookbook/helpers/preview_helper.rb
lookbook-2.0.0.beta.8 lib/lookbook/helpers/preview_helper.rb
lookbook-2.0.0.beta.7 lib/lookbook/helpers/preview_helper.rb
lookbook-2.0.0.beta.6 lib/lookbook/helpers/preview_helper.rb
lookbook-2.0.0.beta.5 lib/lookbook/helpers/preview_helper.rb
lookbook-2.0.0.beta.4 lib/lookbook/helpers/preview_helper.rb
lookbook-2.0.0.beta.3 lib/lookbook/helpers/preview_helper.rb
lookbook-2.0.0.beta.2 lib/lookbook/helpers/preview_helper.rb