Skip to content

Comments

Redirect to show page after create/update instead of index#1146

Merged
maebeale merged 2 commits intomainfrom
maebeale/update-scaffold-templates
Feb 22, 2026
Merged

Redirect to show page after create/update instead of index#1146
maebeale merged 2 commits intomainfrom
maebeale/update-scaffold-templates

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Feb 22, 2026

Closes #1125

What is the goal of this PR and why is this important?

  • Updates the scaffold controller template
  • Update all existing controllers that were redirecting to the index path after create/update to redirect to the show page instead.

How did you approach the change?

Anything else to add?

maebeale and others added 2 commits February 21, 2026 19:28
Updates the scaffold controller template and all existing controllers
that were redirecting to the index path after create/update to redirect
to the show page instead.

Closes #1125

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
respond_to do |format|
if @category.update(category_params)
format.html { redirect_to categories_path, notice: "Category was successfully updated.", status: :see_other }
format.html { redirect_to @category, notice: "Category was successfully updated.", status: :see_other }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

decided against having "Base data" tables CRUD differently. now they all go to show after create.

@maebeale maebeale merged commit 5f99059 into main Feb 22, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/update-scaffold-templates branch February 22, 2026 01:14
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.

Make sure our .tt files route to Show page after create or update

1 participant