Live Rails exercise

Loadar Chat

Shipper and Carrier share a chat about a load. The starter app already lets both users send messages. Right now, sending a message reloads the whole page.

Starter app

Extract the ZIP and run bin/setup from the project folder.

Download starter ZIP

Tasks

We’ll spend about 30 minutes pairing and work through the tasks in order. Use Rails and Hotwire. Docs and AI tools are welcome. Talk us through your decisions as you work.

  1. Send a message without reloading

    When a user sends a message, show it in the chat without a full-page reload. Clear the input after the message is saved.

  2. Edit a sent message

    Let users edit their own messages in place. After saving a change, show the updated text and an Edited label.

  3. Sync across browsers Stretch task

    Open the chat as Shipper and Carrier in separate browser sessions. When one user sends or edits a message, the other user should see the change without refreshing.