Fix undefined method 'bootstrap_svg' on the empty occurrences state - #2
Merged
Conversation
`_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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branched off
main, independent of #1.app/views/solid_errors/occurrences/_collection.html.erb:56calls abootstrap_svghelper that does not exist — not in this gem, not in any dependency:It only fires on the
occurrences.any?false branch, which is why nobody has hit it. Reproduced before the fix:Every other icon in the codebase is an inline SVG (
_actions,_resolve_button,_delete_button), so this one is now too — Bootstrap Iconslist-ul, at 24px to sit beside thetext-2xllabel.No test: there is no way to make a request against the engine yet, since it is not mounted in the dummy app. #1 adds that mount, so once it lands this becomes cheap to cover — happy to follow up.
Suite: 5 runs, 16 assertions, 0 failures.
🤖 Generated with Claude Code