Project

General

Profile

Actions

Feature #3693

closed

API v2 - accept GET json format of object in PUT/POST requests to add/remove has_many associations

Added by Joseph Magen about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Currently we have to use _ids= methods to add/remove relationships. {
"id": 42,
"name": "CentOS",
"architecture_ids": [1,2]
}
This is what we want {
"id": 42,
"name": "CentOS",
"architectures": [ {
"id": 1,
"name": "i386"
}, {
"id": 2,
"name": "x86_64"
}
]
}


Related issues 1 (1 open0 closed)

Related to Foreman - Bug #4571: "Domain (..) expected, got ActiveSupport::HashWithIndifferentAccess(..)" when setting associations with wrapped objectNew03/06/2014Actions
Actions

Also available in: Atom PDF