batch_api
batch_api copied to clipboard
Rails 4 and Ruby 2.1 issue.
What about Rails 4 and Ruby 2.1. When i'am implement batch_api and rails 4 app. PUT method in ops[] response 404, GET and POST method - ok. my query:
{"ops": [ {"method": "PUT", "url": "/api/stock_locations/1/stock_items/1", "params":{"stock_item":{"count_on_hand":"2"}} }, {"method": "get","url": "/api/stock_locations/1/stock_items/1"} ], "sequential": "true"}
UPDATED: params on rails controller after batch_api {"stock_item"=>{"count_on_hand"=>"2"}}
params on rails controller after direct request {"stock_item"=>{"count_on_hand"=>"2"}, "format"=>"json", "action"=>"update", "controller"=>"spree/api/stock_items", "stock_location_id"=>"1", "id"=>"2"}
i started working on some issues and updated it to ruby 2.0.0 and rails 4.1.1
you can check it out here:
https://github.com/easyPEP/batch_api/tree/feature_ruby_2