Skip to content

OID-1640 | Use body for delete action#17

Merged
kkalpakloglou merged 1 commit into
mainfrom
OID-1640-use-body-for-delete-action
Feb 24, 2026
Merged

OID-1640 | Use body for delete action#17
kkalpakloglou merged 1 commit into
mainfrom
OID-1640-use-body-for-delete-action

Conversation

@dzemlianoi-double

@dzemlianoi-double dzemlianoi-double commented Feb 24, 2026

Copy link
Copy Markdown

This PR adds native support for sending a JSON body with HTTP DELETE requests in the remote_resource gem and removes all related monkey patches and workarounds from downstream apps.

What’s changed
remote_resource gem:

  • RemoteResource::Request#body now serializes attributes as JSON for DELETE requests when attributes are present.
  • Both class-level and instance-level #destroy in PersistenceMethods now accept attributes as the DELETE body.
  • All specs updated and expanded to cover new signatures and behaviors.
  • Removed POST-to-:destroy workarounds; now using the gem’s native DELETE with body.

Why

  • Some APIs require a body with DELETE requests, which was not supported natively.
  • This change standardizes and simplifies DELETE-with-body support across all apps using remote_resource.
  • Removes technical debt and improves maintainability.

Backward compatibility

  • All existing destroy usages remain fully backward compatible.
  • Only calls that intentionally pass attributes as the first argument will send a JSON body with DELETE.

@dzemlianoi-double dzemlianoi-double force-pushed the OID-1640-use-body-for-delete-action branch from ed7e0f1 to 2534f03 Compare February 24, 2026 13:43
@dzemlianoi-double dzemlianoi-double force-pushed the OID-1640-use-body-for-delete-action branch from 2534f03 to befb6ce Compare February 24, 2026 13:48
@kkalpakloglou kkalpakloglou merged commit 2325949 into main Feb 24, 2026
3 checks passed
@dzemlianoi-double dzemlianoi-double deleted the OID-1640-use-body-for-delete-action branch February 24, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants