You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the breadcrumbs gem is tightly coupled with controllers, I wonder if there is a way to use it outside a controller by explicitly including it in a class. This would be especially useful for previews.
We use the view_component gem and I haven't found a way to use this gem inside the ViewComponent::Preview.
Something like this would be useful:
classBreadcrumbsComponentPreview < ViewComponent::PreviewincludeBreadcrumbsOnRails# Include gem in another classadd_breadcrumb:home,"/"defdefaultrenderBreadcrumbsComponent.newendend
The text was updated successfully, but these errors were encountered:
Since the breadcrumbs gem is tightly coupled with controllers, I wonder if there is a way to use it outside a controller by explicitly including it in a class. This would be especially useful for previews.
We use the view_component gem and I haven't found a way to use this gem inside the
ViewComponent::Preview
.Something like this would be useful:
The text was updated successfully, but these errors were encountered: