.vbw-planning/milestones/07-rails-audit-and-refactoring/03-controller-route-refactoring/04-PLAN.md
Remove the awkward pluralizer lambda injection from SourceTurboResponses into BulkResultPresenter (C7), letting the presenter handle pluralization directly.
app/controllers/source_monitor/source_turbo_responses.rb:109-113 creates a lambda wrapping ActionController::Base.helpers.pluralize and injects it into BulkResultPresenterlib/source_monitor/scraping/bulk_result_presenter.rb uses the injected pluralizer callable throughoutActionController::Base.helpers.pluralize is available anywhere in Rails -- or simpler, use String#pluralize from ActiveSupport + count interpolationIn lib/source_monitor/scraping/bulk_result_presenter.rb:
pluralizer from initialize parameters and attr_readerpluralizer.call(count, word) calls with a private pluralize(count, word) method that uses "#{count} #{count == 1 ? word : word.pluralize}"In app/controllers/source_monitor/source_turbo_responses.rb:
bulk_scrape_flash_payload to remove the pluralizer lambdaBulkResultPresenter.new(result:) without pluralizerUpdate any tests that construct BulkResultPresenter with a pluralizer argument to remove it. Check:
test/lib/source_monitor/scraping/bulk_result_presenter_test.rb (if exists)test/controllers/source_monitor/source_bulk_scrapes_controller_test.rbbin/rails test -- all passbin/rubocop -- zero offenses