asm-helpful/helpful-web — pull request #72 by austinylin (2013-12-17 23:11:11+00:00)
Title: WIP 165 Ensure we filter display name out of email before saving

WIP: https://assemblymade.com/helpful/wips/165

This PR adds a before_save hook to Person which ensures that only the address portion of an email is persisted to the email field. It filters out all other parts of the address.

The correct way to extract the display name from an email address and save it to the person is implemented in the Api::MessagesController (https://github.com/asm-helpful/helpful-web/blob/master/app/controllers/api/messages_controller.rb#L26)