From 42884028e0a1b4b489f8d4a17011c6d02a64d259 Mon Sep 17 00:00:00 2001 From: Ricky Chilcott Date: Fri, 31 Jul 2026 09:30:48 -0400 Subject: [PATCH] Fix undefined method 'bootstrap_svg' on the empty occurrences state `_collection.html.erb` called a `bootstrap_svg` helper that has never existed in this gem or its dependencies, so rendering an error with no occurrences raised ActionView::Template::Error. Every other icon in the codebase is an inline SVG, so this one is too. Reproduced before the fix with: SolidErrors::ErrorsController.render( partial: "solid_errors/occurrences/collection", locals: {occurrences: [], page: nil, titled: false} ) # => undefined method 'bootstrap_svg' Co-Authored-By: Claude Opus 5 --- CHANGELOG.md | 2 ++ app/views/solid_errors/occurrences/_collection.html.erb | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7624252..960ff5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## [Unreleased] +- Fix `undefined method 'bootstrap_svg'` crash on the error page when an error has no occurrences + ## [0.7.0] - 2025-06-11 - support ruby 3.4.0 style backtrace string ([@kuboon](https://github.com/fractaledmind/solid_errors/pull/74)) diff --git a/app/views/solid_errors/occurrences/_collection.html.erb b/app/views/solid_errors/occurrences/_collection.html.erb index 2221761..78e53e2 100644 --- a/app/views/solid_errors/occurrences/_collection.html.erb +++ b/app/views/solid_errors/occurrences/_collection.html.erb @@ -53,7 +53,9 @@ collection: occurrences, as: :occurrence %> <% else %>
- <%= bootstrap_svg "list-ul" %> + + + No occurrences yet…
<% end %>