Sha256: 13eb214f8daaf3ce59c3abb695217288b6634097159a1ed6768affa406eb96bd

Contents?: true

Size: 704 Bytes

Versions: 7

Compression:

Stored size: 704 Bytes

Contents

# frozen_string_literal: true

require "active_support/concern"

module ViewComponent # :nodoc:
  module Previewable
    extend ActiveSupport::Concern

    included do
      # Set the location of component previews through app configuration:
      #
      #     config.action_view_component.preview_path = "#{Rails.root}/lib/component_previews"
      #
      mattr_accessor :preview_path, instance_writer: false

      # Enable or disable component previews through app configuration:
      #
      #     config.action_view_component.show_previews = true
      #
      # Defaults to +true+ for development environment
      #
      mattr_accessor :show_previews, instance_writer: false
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
view_component-1.17.0 lib/view_component/previewable.rb
actionview-component-1.17.0 lib/view_component/previewable.rb
view_component-1.16.0 lib/view_component/previewable.rb
actionview-component-1.16.0 lib/view_component/previewable.rb
actionview-component-1.15.0 lib/view_component/previewable.rb
actionview-component-1.14.1 lib/view_component/previewable.rb
actionview-component-1.14.0 lib/view_component/previewable.rb