Wrap comment params for flat JSON payloads (#2679)

* Wrap comment params for flat JSON payloads

The SDK sends flat JSON ({"body": "..."}) but Rails wrap_parameters
auto-detection misses :body since it's a virtual ActionText attribute,
not in Comment.attribute_names. Explicitly declare wrap_parameters so
params.expect(comment: [...]) works with both wrapped and flat payloads.

* Test comment create and update with flat JSON params
This commit is contained in:
Jeremy Daer
2026-03-09 17:02:08 -07:00
committed by GitHub
parent 23ac76555b
commit 71a1ee7031
2 changed files with 21 additions and 0 deletions
@@ -1,4 +1,5 @@
class Cards::CommentsController < ApplicationController
wrap_parameters :comment, include: %i[ body created_at ]
include CardScoped
before_action :set_comment, only: %i[ show edit update destroy ]