[openstreetmap/openstreetmap-website] Add a preferred_email_format preference (#1511)
Hervé Saint-Amand
notifications at github.com
Sat Apr 1 20:58:32 UTC 2017
In [a comment back in February](http://www.openstreetmap.org/user/saintam1/diary/40383#comment37708), SomeoneElse pointed out that it would be desirable to allow users to turn off the new HTML mails. This PR implements that, by adding a new user preference, called `preferred_email_format`.
The new setting can either be `multipart` or `text_only`. I hesitated between making it an enum (which seemed semantically more appropriate) or a boolean (which would potentially be more compact). I went with the enum, I'm open to feedback.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/1511
-- Commit Summary --
* Added preferred_email_format option
* Handle anonymous users
* Merge branch 'master' into plain-mail-option
* A couple new changeset comment tests
* A few more tests relating to email format
-- File Changes --
M app/controllers/user_controller.rb (2)
M app/models/notifier.rb (87)
M app/views/user/account.html.erb (6)
M config/locales/en.yml (4)
A db/migrate/20170320220020_add_preferred_email_format.rb (8)
M test/controllers/changeset_controller_test.rb (23)
M test/controllers/diary_entry_controller_test.rb (31)
M test/controllers/message_controller_test.rb (34)
M test/controllers/notes_controller_test.rb (30)
M test/controllers/user_controller_test.rb (2)
M test/fixtures/users.yml (26)
M test/integration/user_creation_test.rb (2)
M test/test_helper.rb (31)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/1511.patch
https://github.com/openstreetmap/openstreetmap-website/pull/1511.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1511
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170401/58c785b1/attachment.html>
More information about the rails-dev
mailing list