You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
709 B
18 lines
709 B
# frozen_string_literal: true
|
|
|
|
ActiveSupport.on_load(:view_component) do
|
|
# Extend your preview controller to support authentication and other
|
|
# application-specific stuff
|
|
#
|
|
# Rails.application.config.to_prepare do
|
|
# ViewComponentsController.class_eval do
|
|
# include Authenticated
|
|
# end
|
|
# end
|
|
#
|
|
# Make it possible to store previews in sidecar folders
|
|
# See https://github.com/palkan/view_component-contrib#organizing-components-or-sidecar-pattern-extended
|
|
ViewComponent::Preview.extend ViewComponentContrib::Preview::Sidecarable
|
|
# Enable `self.abstract_class = true` to exclude previews from the list
|
|
ViewComponent::Preview.extend ViewComponentContrib::Preview::Abstract
|
|
end
|
|
|