spree/spree — pull request #5458 by HoyaBoya (2014-10-07 17:58:17+00:00)
Title: Make create endpoint require important params

It's possible for the /api/shipments create to execute without checking all of the parameters passed. In my particular case, if the ```stock_location_id``` is not passed, then we see a RABL error when trying to render the stock location name.

https://github.com/spree/spree/blob/master/api/app/views/spree/api/shipments/show.v1.rabl#L5

```
{"exception":"undefined method `name' for nil:NilClass"}
```

This change leverages ```params.fetch``` to raise the appropriate ActionController::ParameterMissing error so that the API can tell the client it's missing key values, per the Spree API docs.