Module: Blacklight::ContentAreasShim
- Included in:
- AdvancedSearchFormComponent, ConstraintsComponent, DocumentComponent, FacetFieldComponent, FacetFieldNoLayoutComponent, MetadataFieldLayoutComponent, SearchBarComponent, System::ModalComponent
- Defined in:
- app/components/blacklight/content_areas_shim.rb
Overview
Shim to support ViewComponent v2 slots using the content_areas API for backwards compatibility
Instance Method Summary collapse
-
#with(slot_name, *args, **kwargs, &block) ⇒ Object
Shim the `with` helper to write content into slots instead.
Instance Method Details
#with(slot_name, *args, **kwargs, &block) ⇒ Object
Shim the `with` helper to write content into slots instead
7 8 9 10 11 |
# File 'app/components/blacklight/content_areas_shim.rb', line 7 def with(slot_name, *args, **kwargs, &block) Deprecation.warn(Blacklight::ContentAreasShim, 'ViewComponents deprecated `with` and it will be removed in ViewComponents 3.0. content_areas. Use slots (https://viewcomponent.org/guide/slots.html) instead.') public_send(slot_name, *args, **kwargs, &block) end |