Walk Sessions: Start & End

resource :walk_session, singular β€” on purpose

Read the real route again, this time noticing what's different about it: resource :walk_session, only: %i[create update] β€” no s. Rails' resource (singular) generates routes for exactly ONE record scoped to its parent, with NO :id in the URL and no index: POST /bookings/:booking_id/walk_session and PATCH /bookings/:booking_id/walk_session, nothing else. Compare that to resources :location_pings (plural, lesson 5) which DOES carry an :id and DOES have an index.

Why singular here: a booking has at most one walk session β€” you start it once, you end it once. There's no list to index and no id to look up, because "the walk session for booking 7" is already a complete, unambiguous address. Reaching for resource instead of resources isn't a style pick β€” it's the route shape telling the truth about the data.