Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/boards_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def update
redirect_to root_path, notice: "Saved (you were removed from the board)"
end
end
format.json { head :no_content }
format.json { render :show }
Comment thread
robzolkos marked this conversation as resolved.
Outdated
end
end

Expand Down
26 changes: 25 additions & 1 deletion docs/api/sections/boards.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,31 @@ __Request:__

__Response:__

Returns `204 No Content` on success.
Returns `200 OK` with the updated board in the same shape as `GET /:account_slug/boards/:board_id`:

```json
{
"id": "03f5v9zkft4hj9qq0lsn9ohcm",
"name": "Updated board name",
"all_access": false,
"created_at": "2025-12-05T19:36:35.534Z",
"auto_postpone_period_in_days": 30,
"url": "http://app.fizzy.localhost:3006/897362094/boards/03f5v9zkft4hj9qq0lsn9ohcm",
"creator": {
"id": "03f5v9zjw7pz8717a4no1h8a7",
"name": "David Heinemeier Hansson",
"role": "owner",
"active": true,
"email_address": "david@example.com",
"created_at": "2025-12-05T19:36:35.401Z",
"url": "http://app.fizzy.localhost:3006/897362094/users/03f5v9zjw7pz8717a4no1h8a7"
},
"user_ids": [
"03f5v9zppzlksuj4mxba2nbzn",
"03f5v9zjw7pz8717a4no1h8a7"
]
}
```
Comment thread
robzolkos marked this conversation as resolved.

## `DELETE /:account_slug/boards/:board_id`

Expand Down
7 changes: 6 additions & 1 deletion test/controllers/boards_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,13 @@ class BoardsControllerTest < ActionDispatch::IntegrationTest

put board_path(board), params: { board: { name: "Updated Name" } }, as: :json

assert_response :no_content
assert_response :success
assert_equal "Updated Name", board.reload.name

json = @response.parsed_body
assert_equal board.id, json["id"]
assert_equal "Updated Name", json["name"]
assert_equal board.creator.id, json["creator"]["id"]
end

test "destroy as JSON" do
Expand Down
Loading