[Rails-core] Deprecate/Remove ActionController::ParamsWrapper

2015-02-14 Thread Wojciech Wnętrzak
I have a small inconvenience with existing legacy app, that works as an API. It has enabled (by default) params wrapper for JSON format. It creates some noise in logs when a root key of params is different than the name of a controller, as it duplicates it. It cannot be easily removed now, since I

Re: [Rails-core] Deprecate/Remove ActionController::ParamsWrapper

2015-02-26 Thread James Coleman
>> I disagree that “there’s no need for the submitting JS to know anything about the root key” I should clarify that I wasn't expressing an opinion either way, but rather summarizing what it seemed DHH was saying. On Thu, Feb 26, 2015 at 12:10 PM, Jason Fleetwood-Boldt < t...@datatravels.com> wro

Re: [Rails-core] Deprecate/Remove ActionController::ParamsWrapper

2015-02-26 Thread Jason Fleetwood-Boldt
Unless I’m misreading it the JSON API (http://jsonapi.org/format/ ), currently being worked on by Katz and others, specifies that submitted resources should look like this: POST /photos Content-Type: application/vnd.api+json Accept: application/vnd.api+json { "da

Re: [Rails-core] Deprecate/Remove ActionController::ParamsWrapper

2015-02-26 Thread John Mileham
To me it sounds like there are three points of view here: WW: Developers should never wrap params, dirty root is fine, prefer to deprecate the wrap_parameters feature (rebutted by DHH below) DHH: Wrap parameters is useful to normalize between the common JSON style of not using a root and the commo

Re: [Rails-core] Deprecate/Remove ActionController::ParamsWrapper

2015-02-26 Thread John Mileham
A closer reading of the linked json:api page indicates that what they're talking about isn't the same as what I was calling a "rooted JSON" object, as evidenced by the fact that there are both "data" and "error" keys at the root level (neither corresponding to the resource name being sent). It see