alphagov/maslow — pull request #12 by JordanHatch (2013-10-25 09:06:27+00:00)
Title: Send the author details to the Need API

This changes Maslow to always send details about the current user to the Need API when a need is saved. The `name`, `email` and `uid` attributes are sent in the JSON request body inside the `author` hash.

As author information will be required by the Need API for any changes, the existing `Need.save` method will now raise an error, as the new method `Need.save_as(author)` should be used.

This pull request also includes changes to the unit tests so that there is improved test coverage for the Need model, and a fix for correctly determining the `currently_met` value when we prepare the need ready for JSON serialization.