minor fix to regression of post seeds after introducing rubocop #440
Merged
leesheppard merged 2 commits intorubyaustralia:mainfrom Feb 5, 2026
Merged
minor fix to regression of post seeds after introducing rubocop #440leesheppard merged 2 commits intorubyaustralia:mainfrom
leesheppard merged 2 commits intorubyaustralia:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a regression in post seed data generation that was introduced when refactoring code for Rubocop compliance. The post_content_enhanced method was not explicitly returning the generated HTML content, causing posts to display "3" (the return value of 3.times) instead of the full content.
Changes:
- Added explicit
contentreturn statement topost_content_enhancedmethod - Consolidated string concatenations on lines 41 and 45 for improved readability
- Added blank line before return statement for code style consistency
1d11ab5 to
71d0c78
Compare
leesheppard
approved these changes
Feb 5, 2026
leesheppard
reviewed
Feb 5, 2026
| def post_content_enhanced | ||
| content = "<strong>#{heading} #{Faker::Lorem.multibyte}</strong>" | ||
| content += "<br />" | ||
| content = "<strong>#{heading} #{Faker::Lorem.multibyte}</strong><br />" |
Member
There was a problem hiding this comment.
I'm surprised Herb didn't complain about <br /> as the W3C validator now prompts warnings against the use of self closing brackets.
Contributor
Author
There was a problem hiding this comment.
I didn’t know about the w3c recc! Thanks for sharing!
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.
Fix minor regression to post seeds, introduced in #432
I broke generating enhanced post content seeds when I shortened the method and messed with the implicit return, so we ended up with a '3' instead of a bunch of html content
PR also includes a single character white space fix to satisfy herb, probably I failed to push that fix when raising this earlier PR
before
after