Skip to content

✨ Add date range filtering to changes index#76

Merged
fusion94 merged 1 commit intomasterfrom
feat/67-date-range-filter
Mar 18, 2026
Merged

✨ Add date range filtering to changes index#76
fusion94 merged 1 commit intomasterfrom
feat/67-date-range-filter

Conversation

@fusion94
Copy link
Copy Markdown
Collaborator

Summary

Filter changes by date range with ?from= and ?to= query parameters.

Changes

  • changes_controller.rb: Parse from/to params, add WHERE clauses, parse_date helper
  • index.html.erb: Date filter form with inputs, submit, clear link
  • spec/integration/date_filter_spec.rb: 10 new tests

Features

  • ?from=2026-01-01 — changes on or after
  • ?to=2026-03-14 — changes on or before
  • Combinable with existing type/id filters
  • Invalid dates ignored gracefully
  • Form preserves values and existing filters
  • Clear link to reset date filters

Test Results

  • 50 examples, 0 failures (Rails 7.1 + kaminari)
  • 50 examples, 0 failures (Rails 7.1 + will_paginate)

Closes #67

Filter changes by date range via from/to query parameters:
- ?from=2026-01-01 — changes on or after
- ?to=2026-03-14 — changes on or before
- Combine with existing type/id filters
- Invalid dates ignored gracefully (parse_date returns nil)
- UI: date input fields with filter/clear buttons
- Preserves existing type/id params when filtering

10 new tests covering from, to, combined, with type filter,
invalid dates, and form rendering.

Test count: 40 → 50

Closes #67
@fusion94 fusion94 merged commit 451ec5f into master Mar 18, 2026
18 checks passed
@fusion94 fusion94 deleted the feat/67-date-range-filter branch March 18, 2026 18:30
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.

Add date range filtering to changes index

1 participant