Skip to content

Add Puzzle validation#40

Merged
mateusdeap merged 2 commits intomainfrom
add-puzzle-validations
Oct 9, 2025
Merged

Add Puzzle validation#40
mateusdeap merged 2 commits intomainfrom
add-puzzle-validations

Conversation

@JuanVqz
Copy link
Copy Markdown
Member

@JuanVqz JuanVqz commented Oct 8, 2025

What

Inspired by #35 to know more about turbo and the need to add validations, I decided to contribute by adding the validation on top of Fiona's PR.

image

@JuanVqz JuanVqz requested a review from FionaDL October 8, 2025 16:24
respond_to do |format|
format.turbo_stream { render turbo_stream: turbo_stream.replace(@puzzle, partial: "puzzles/form", locals: { puzzle: @puzzle }) }
else
format.turbo_stream { render turbo_stream: turbo_stream.replace("modal", partial: "puzzles/edit_modal", locals: { puzzle: @puzzle }), status: :unprocessable_entity }
Copy link
Copy Markdown
Member Author

@JuanVqz JuanVqz Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the reason the errors didn't show up at Fiona's PR; the first element should be the turbo frame's name.

Also had to move the edit.html.erb view content into a partial _edit_modal.html.erb because this turbo stream needed it to render the errors

@JuanVqz JuanVqz changed the base branch from feat/edit-puzzles to main October 9, 2025 15:27
@JuanVqz JuanVqz force-pushed the add-puzzle-validations branch from 523b1bf to a7bda7b Compare October 9, 2025 15:34
@mateusdeap mateusdeap merged commit dcb8e67 into main Oct 9, 2025
4 checks passed
@JuanVqz JuanVqz deleted the add-puzzle-validations branch March 10, 2026 21:59
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.

2 participants