Fix Liquid errors in no-ticket reminder notification template#11212
Merged
Fix Liquid errors in no-ticket reminder notification template#11212
Conversation
Three bugs caused Liquid errors when rendering the template: 1. SignupRankedChoice lacked to_liquid, so passing the AR relation to Liquid caused "undefined method 'to_liquid'" errors. Added SignupRankedChoiceDrop and to_liquid on the model; also convert queue_items to an array in the notifier so Liquid can iterate it. 2. RunDrop didn't expose title_suffix, causing the run title suffix to be inaccessible in the template. 3. The ticket URL used `convention.url | append: '/ticket/new' | absolute_url`, but absolute_url expects a relative path. Changed to `'/ticket/new' | absolute_url`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nder Move to_liquid before private in SignupRankedChoice so it's callable by the Liquid template engine. Add a test asserting the rendered email body contains no Liquid errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Liquid treats empty strings as truthy, so use != blank instead of a simple presence check to avoid rendering empty parentheses for events with no title suffix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers the errors.add branch in ensure_all_fields_point_at_the_same_convention, bringing signup_ranked_choice.rb to 100% line coverage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
merge-cobertura keeps each test suite as a separate package, so the coverage action's per-package comparison flags false regressions when a file is fully covered in unit tests but not in system tests. The new script merges all three reports into a single package by summing hits per line, giving an accurate combined coverage for each file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
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.
Summary
SignupRankedChoiceDropso Liquid templates can accesstarget_runon queue itemsto_liquidtoSignupRankedChoice(moved beforeprivateso it's publicly callable)title_suffixtoRunDrop's delegate list so templates can use it.to_acall in notifier so thequeue_itemscollection is Liquid-iterableabsolute_urlexpects a relative path, not an absolute oneTest plan
RemindQueueWithoutTicketTesttests pass🤖 Generated with Claude Code