Skip to content

fix: replace removed pagy_bootstrap_nav helper in invitation logs index - #3039

Merged
olleolleolle merged 1 commit into
masterfrom
fix/invitation-logs-pagination
Oct 15, 2026
Merged

olleolleolle merged 1 commit into
masterfrom
fix/invitation-logs-pagination

Conversation

@mroderick

Copy link
Copy Markdown
Collaborator

The invitation logs index raised NoMethodError whenever an invitation log spanned more than one page: pagy 43 removed the legacy pagy_* helpers the view still called. The view now calls series_nav(:bootstrap), the same helper the shared pagination partial uses, so multi-page logs render a nav again.

Closes #3038

Review notes

  • Look first at the one-line change in app/views/admin/workshop_invitation_logs/index.html.haml; the spec defines the expected behaviour (multi-page render).
  • Risk: the nav markup comes from pagy's bootstrap style, identical to shared/_pagination. This view has been broken since the pagy 43 upgrade, so there is no working before-state to compare against.
  • Deliberately not done: reusing the shared pagination partial would add the item-count line this view never showed, so the change stays a helper swap.
Detail
  • pagy_bootstrap_nav was a pagy ≤ 5 helper; pagy 43 provides series_nav(style) instead, and nothing in the app defines the old name.
  • The spec enables render_views (controller specs skip view rendering otherwise), seeds 21 logs to cross the 20-per-page boundary, and asserts the bootstrap nav markup. The logs use status: 'completed' because index_invitation_logs_unique_active only allows one running log per loggable/audience/action combination.

pagy 43 removed the legacy pagy_* helpers, so the view raised
NoMethodError as soon as an invitation log spanned more than one
page. Call series_nav(:bootstrap), the same helper the shared
pagination partial uses, and cover the multi-page render with a
controller spec.
@mroderick
mroderick marked this pull request as ready for review October 15, 2026 11:05

@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.

Good fix!

@olleolleolle
olleolleolle merged commit 0adb62a into master Oct 15, 2026
11 checks passed
@olleolleolle
olleolleolle deleted the fix/invitation-logs-pagination branch October 15, 2026 14:05
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.

workshop_invitation_logs index calls pagy_bootstrap_nav, which no longer exists in pagy 43

2 participants