ministryofjustice/scs_appraisals — pull request #5 by Najaf (2014-12-07 22:49:33+00:00)
Title: Feedback notification mail

Hi all (/cc @threedaymonk)

This PR sends a notification email to the feedback subject whenever feedback is submitted about them. A few points:

* I went ahead and snuck in missing tests for other emails in `ReviewMailer` into this PR. This ended up with a lot of repetition in that [file](https://github.com/ministryofjustice/scs_appraisals/blob/0b6d6fce5ec5144c450d2b79620d488475c65b6a/spec/mailers/review_mailer_spec.rb) so any suggestions on clearing that up would be appreciated.
* I'm not 100% convinced of the value of the top-level `notifications/` directory and the `BlahNotification` classes within it. I can see what they're for (creating a token from the thing you pass in and then handing off to a Mailer) but unless there's some future logic these classes are planned to have that I'm unaware of, this strikes me as something that could be accomplished by a single generic component. In any case, using `send` as the main method you call on it is a little dicey, don't you think?

Any feedback/thoughts appreciated!