Template - Rails 7 view component Projet d'origine: Veracyte Stack: - Rails 7 - Ruby 3.1 - ViewComponent configuré comme on veut - Tailwind
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.
 
 
 
 
 
rails_view_component/config/initializers/view_components_contrib.rb

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