railsforcharity/spokenvote — pull request #285 by thomasgwatson (2014-03-25 19:55:36+00:00)
Title: Notifier

Notifications, in their basic state. I have tried to keep the commits small and commented, hopefully it more or less makes sense. Still need to style the emails and properly configure preferences.

### Summary
The NotificationBuilder is part of the model, but does not persist in the DB (no link to Active Record). It is coupled to the vote model and VoteMailer controller.

The VoteMailer controller takes care of the actual sending of emails. It is probably wise for the NotificationBuilder to queue it's deliver requests to the VoteMailer in a queue but at the moment it is not strictly necessary.

A rake task has been built, for the planned integration with Heroku scheduler.

### Outstanding tasks:

- Styling the emails!
I am only starting on the exciting journey of using HAML, so someone else can probably bash this out without too much trouble. I have already included the premailer-rails gem, which should make the styling applied to the email template be inlined and display correctly
- Integration with preferences
I've created the preferences column on the User table but there are some design questions I have to ask before it can be worked on.