Project

General

Profile

Feature #4218

V2 API: Add support for PUT of array of json relationship objects

Added by David Davis over 5 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Option #3 I created a before_filter in api/v2/base_controller.rb

https://github.com/isratrade/foreman/blob/inherit_loc/app/controllers/api/v2/base_controller.rb#L11

Basically, I manipulated the input to convert from an array of JSON objects to get attribute :column_names_ids = [1,2,3,4] which is what Rails likes in the standard `update_attributes` method
Note, column_names_names = ["name1", "name2"] also works.

History

#1 Updated by Eric Helms about 5 years ago

  • Category set to API
  • Triaged set to Yes

#2 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) set to 114

Also available in: Atom PDF