Skip to content

Fix broken RFC embeds on the fundraising page - #2967

Merged
olleolleolle merged 3 commits into
masterfrom
fix-broken-rfc-embeds
Oct 13, 2026
Merged

olleolleolle merged 3 commits into
masterfrom
fix-broken-rfc-embeds

Conversation

@KimberleyCook

Copy link
Copy Markdown
Contributor

Update fundraising page to include challenge events as the Run for Charity embeds were broken.

I've also added a new section on how fundraising helps codebar

Before After
screencapture-codebar-io-fundraise-2026-09-30-12_54_01 screencapture-localhost-3000-fundraise-2026-09-30-12_53_48

…t the bottom on the impact their event has

within "[data-test='fundraising-events']" do
expect(page).to have_css('.card').at_least(1)
page.all('.card').each do |card|

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The CI RuboCop job is failing on this line (three offenses, this one plus lines 55 and 81):

spec/features/viewing_pages_spec.rb:40:25: C: [Correctable] Rails/FindEach: Use find_each instead of each.

Rails/FindEach exists to catch ActiveRecord scopes, where .each loads the whole relation into memory and .find_each batches. That doesn't apply here: page.all is Capybara, and it returns an in-memory snapshot of DOM elements, so there is nothing to batch. RuboCop thinks it is correctable, but autocorrecting to find_each would break the spec at runtime because Capybara elements have no find_each.

Suggested change — silence the cop just for these occurrences:

# rubocop:disable Rails/FindEach
page.all('.card').each do |card|
  ...
end
# rubocop:enable Rails/FindEach

(spec/features is already excluded from some RuboCop checks, but inline disables keep the diff local. bundle exec rubocop passes on master, so the three new offenses are the only blockers on this PR.)

@KimberleyCook

Copy link
Copy Markdown
Contributor Author

@mroderick This is now ready 🎉

@olleolleolle olleolleolle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🚀 Let’s go!

@olleolleolle
olleolleolle merged commit ca4b6ff into master Oct 13, 2026
11 checks passed
@olleolleolle
olleolleolle deleted the fix-broken-rfc-embeds branch October 13, 2026 12:27
@KimberleyCook

Copy link
Copy Markdown
Contributor Author

Thaaaanks @olleolleolle 💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants