Fix log editing: add missing edit view and Edit link - #1871
Merged
Conversation
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>
|
🚅 Deployed to the wod-tracker-pr-1871 environment in wod-tracker
|
railway-app
Bot
temporarily deployed
to
wod-tracker / wod-tracker-pr-1871
August 19, 2026 18:20
Destroyed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LogsController#edit/#update, the route, and the shared_formpartial all existed, butapp/views/logs/edit.html.slimwas never added, so visiting the edit URL crashed with a missing-template error.app/views/logs/edit.html.slim(mirrors the existingnew.html.slimpattern) and an "Edit" button next to "Delete" on the show page.Root cause
Reproduced locally:
GET /workouts/:workout_id/logs/:id/editraisedLogsController#edit is missing a template for request formats: text/html.test/controllers/logs_controller_test.rbonly 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.rbfiles changed, so no RuboCop findings apply🤖 Generated with Claude Code