drogus / bulk_api

MIT License
149 stars 7 forks source link

Do not wrap params into a nested hash (Rails 3.1) #11

Closed aflatter closed 13 years ago

aflatter commented 13 years ago

A little work around as long as we use ActionController.

Requests with Content-Type: application/json were wrapped into another hash.

drogus commented 13 years ago

This will break 3.0 apps - while I don't want to support 3.0 apps for a longer period of time, I would like to keep it compatible at least for some time - can you check if that method is available before calling it?

aflatter commented 13 years ago

Uhm, I think 3.0 behaves nicely which is why we don't need to unset the wrapping:

if respond_to?(:wrap_parameters) should mean that 3.0 won't know about anything; I did not test that though.

aflatter commented 13 years ago

Oh damn, I shouldn't have pushed to master. I will work on branches by now :)

aflatter commented 13 years ago

Let me clean things up first. I will push all my changes in a few days (including a backwards-compatible version of the new query parser, all that rack stuff and probably tests against rails 3.0 and 3.1).