Skip to content

minor fix to regression of post seeds after introducing rubocop #440

Merged
leesheppard merged 2 commits intorubyaustralia:mainfrom
lee-treehouse:fix-post-seeds
Feb 5, 2026
Merged

minor fix to regression of post seeds after introducing rubocop #440
leesheppard merged 2 commits intorubyaustralia:mainfrom
lee-treehouse:fix-post-seeds

Conversation

@lee-treehouse
Copy link
Contributor

@lee-treehouse lee-treehouse commented Feb 3, 2026

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

CleanShot 2026-02-04 at 08 51 26@2x

after

CleanShot 2026-02-04 at 08 55 14@2x

Copilot AI review requested due to automatic review settings February 3, 2026 21:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 content return statement to post_content_enhanced method
  • Consolidated string concatenations on lines 41 and 45 for improved readability
  • Added blank line before return statement for code style consistency

@github-project-automation github-project-automation bot moved this from Todo to Done in RubyAU Community PM Feb 5, 2026
def post_content_enhanced
content = "<strong>#{heading} #{Faker::Lorem.multibyte}</strong>"
content += "<br />"
content = "<strong>#{heading} #{Faker::Lorem.multibyte}</strong><br />"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised Herb didn't complain about <br /> as the W3C validator now prompts warnings against the use of self closing brackets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t know about the w3c recc! Thanks for sharing!

@leesheppard leesheppard merged commit cb03fd4 into rubyaustralia:main Feb 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants