giv2giv/giv2giv-rails

EndowmentsController#create style mismatch

Closed this issue · 3 comments

EndowmentsController#create - there seems to be a mismatch between rails style param passing {endowments : {name: "name", ...}} and the api's style: {name: "name", ...} This could lead to some confusion (as it apparently did with the test suite). This also makes the requests and responses asymmetric since the response is of the form {endowment: {name: "name", ...}}

I simply commented out the manual hash to look like the other model create defs. 901ad05

Unfortunately this causes tests to fail. See spec/controllers/api/endowment_controller_spec.rb for create test marked 'pending'

Thanks Ben!