Skip to content

Fix NoMethodError for format_run_start_day in RunSignupsFilenameFinder#11272

Merged
nbudin merged 2 commits intomainfrom
11271-fix-format-run-start-day-method-error
Apr 10, 2026
Merged

Fix NoMethodError for format_run_start_day in RunSignupsFilenameFinder#11272
nbudin merged 2 commits intomainfrom
11271-fix-format-run-start-day-method-error

Conversation

@nbudin
Copy link
Copy Markdown
Contributor

@nbudin nbudin commented Apr 9, 2026

Summary

  • Fixes NoMethodError: undefined method 'format_run_start_day' for class CsvExportsController::RunSignupsFilenameFinder
  • The PRIORITIZED_FILENAME_GENERATORS constant was defined at the class body level, so lambdas inside it couldn't call instance methods like format_run_start_day
  • Moved the generators list into a private filename_generators instance method so the lambdas close over self and can call instance methods correctly
  • Added tests to test/controllers/csv_exports_controller_test.rb covering the bug scenario and the single-run case

Fixes #11271

Test plan

  • bin/rails test test/controllers/csv_exports_controller_test.rb passes
  • Verify run signups CSV export works for events with multiple runs

#11271)

Move filename generators from a class-level constant into a private instance
method so the lambdas close over self and can call instance methods.
@nbudin nbudin added bug patch Bumps the patch version number on release labels Apr 9, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
app/controllers/csv_exports_controller.rb 🔴 0% 🔴 45.76% 🟢 45.76%
test/controllers/graphql_controller_test.rb 🔴 0% 🟢 100% 🟢 100%
Overall Coverage 🟢 53.12% 🟢 53.13% 🟢 0.01%

Minimum allowed coverage is 0%, this run produced 53.13%

@nbudin nbudin merged commit c5fe951 into main Apr 10, 2026
19 checks passed
@nbudin nbudin deleted the 11271-fix-format-run-start-day-method-error branch April 10, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug patch Bumps the patch version number on release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NoMethodError: undefined method 'format_run_start_day' for class CsvExportsController::RunSignupsFilenameFinder (NoMethodError)

1 participant