File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
app/views/view_components Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ namespace :docs do
9595 require "rails"
9696 require "action_controller"
9797 require "view_component"
98- ViewComponent ::Base . config . view_component_path = "view_component"
98+ ViewComponent ::GlobalConfig . view_component_path = "view_component"
9999 require "view_component/docs_builder_component"
100100
101101 error_keys = registry . keys . select { |key | key . to_s . include? ( "Error::MESSAGE" ) } . map ( &:to_s )
Original file line number Diff line number Diff line change 11<% if @render_args[:component] %>
2- <% if ViewComponent::Base.config .render_monkey_patch_enabled || Rails.version.to_f >= 6.1 %>
2+ <% if ViewComponent::GlobalConfig .render_monkey_patch_enabled || Rails.version.to_f >= 6.1 %>
33 <%= render(@render_args[:component], @render_args[:args], &@render_args[:block]) %>
44 <% else %>
55 <%= render_component(@render_args[:component], &@render_args[:block]) %>
88 <%= render template: @render_args[:template], locals: @render_args[:locals] || {} %>
99<% end %>
1010
11- <% if ViewComponent::Base.config .show_previews_source %>
11+ <% if ViewComponent::GlobalConfig .show_previews_source %>
1212 <%= preview_source %>
1313<% end %>
Original file line number Diff line number Diff line change 11module ViewComponent
2- GlobalConfig = defined? ( Rails ) ? Rails . application . config . view_component : Base . config
2+ GlobalConfig = defined? ( Rails ) && Rails . application ? Rails . application . config . view_component : Base . config
33end
You can’t perform that action at this time.
0 commit comments