otwcode/otwarchive — pull request #615 by Talvalin (2012-05-10 15:40:52+00:00)
Title: Fix for issue 1807

Apologies for crappy variable naming. I blame Enigel who claimed to rock at naming things and then drew a blank when I asked for help. :P If one of you lovely people can think of something more meaningful then I will be more than happy to update the code where necessary. :)

*models/creation_observer.rb*
- after_update method added which fixes the initial problem of edited works not sending out gift notification emails. Also modified notify_recipients to use the new virtual atttribute new_recipients...

*models/work.rb*
- added a new virtual attribute new_recipients which stores changes to the recipients list. I hope the spec tests explain how this is supposed to be work, but that's assuming my test descriptions were clear, which they might not be.

*spec/models/work_spec.rb*
- added tests for the new_recipients virtual attribute.