Skip to content

[IIRR-41] Preserve filters when cloning archived puzzle#88

Open
JuanVqz wants to merge 1 commit into
mainfrom
IIRR-41
Open

[IIRR-41] Preserve filters when cloning archived puzzle#88
JuanVqz wants to merge 1 commit into
mainfrom
IIRR-41

Conversation

@JuanVqz
Copy link
Copy Markdown
Member

@JuanVqz JuanVqz commented May 21, 2026

Summary

  • Clone action on archived puzzles redirected to the bare index, dropping the active filters (low_success_rate, hide_cloned_puzzles) and forcing the user to re-apply them between clones.
  • Swap redirect_to puzzles_path for redirect_back fallback_location: puzzles_path in Puzzles::ClonesController#create so the user lands back on the same filtered view.

Test plan

  • bin/rails test test/controllers/puzzles/clones_controller_test.rb
  • Manually: enable a filter on Archived Puzzles, click Clone, confirm filter still applied.

Use redirect_back so the Archived list keeps active filters
(low_success_rate, hide_cloned_puzzles) after a clone.
@JuanVqz JuanVqz self-assigned this May 21, 2026
@JuanVqz JuanVqz requested a review from arielj May 21, 2026 00: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.

1 participant