Skip to content

Fix log editing: add missing edit view and Edit link - #1871

Merged
Yanchek99 merged 1 commit into
masterfrom
claude/log-editing-issue-621829
Aug 19, 2026
Merged

Fix log editing: add missing edit view and Edit link#1871
Yanchek99 merged 1 commit into
masterfrom
claude/log-editing-issue-621829

Conversation

@Yanchek99

Copy link
Copy Markdown
Owner

Summary

  • Log editing was completely broken: LogsController#edit/#update, the route, and the shared _form partial all existed, but app/views/logs/edit.html.slim was never added, so visiting the edit URL crashed with a missing-template error.
  • The log show page also had no "Edit" link/button at all (only Delete), so there was no way to reach the edit page through the UI even once the template exists.
  • Adds app/views/logs/edit.html.slim (mirrors the existing new.html.slim pattern) and an "Edit" button next to "Delete" on the show page.

Root cause

Reproduced locally: GET /workouts/:workout_id/logs/:id/edit raised LogsController#edit is missing a template for request formats: text/html. test/controllers/logs_controller_test.rb only covered the unauthorized edit path (404 for another user's log), never a successful edit by the owner, so the missing template/link went uncaught.

Test plan

  • bin/rails test test/controllers/logs_controller_test.rb — 33 runs, 0 failures
  • Manual verification in a local browser session: signed in as a seeded user, opened a log's show page, clicked the new Edit link, changed a Load value, submitted, confirmed "Log was successfully updated." and the new value persisted; reverted the test data change afterward
  • No .rb files changed, so no RuboCop findings apply

🤖 Generated with Claude Code

LogsController#edit/#update, the route, and the shared _form partial
already existed, but app/views/logs/edit.html.slim was never added, so
visiting the edit URL crashed with a missing-template error. The show
page also had no Edit link, so there was no way to reach the page at
all. Add the template (mirrors new.html.slim) and an Edit button next
to Delete on the show page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@railway-app

railway-app Bot commented Aug 19, 2026

Copy link
Copy Markdown

🚅 Deployed to the wod-tracker-pr-1871 environment in wod-tracker

Service Status Web Updated (UTC)
web ✅ Success (View Logs) Web Aug 19, 2026 at 6:32 pm
worker ✅ Success (View Logs) Aug 19, 2026 at 6:22 pm

@railway-app
railway-app Bot temporarily deployed to wod-tracker / wod-tracker-pr-1871 August 19, 2026 18:20 Destroyed
@Yanchek99
Yanchek99 merged commit 428044f into master Aug 19, 2026
8 checks passed
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