213 change location email

Rebased version of #236, ready to merge into rails-3.2

Some of the commits are duplicated because I had to fix the merge conflicts twice.