[openstreetmap/openstreetmap-website] Dressed up notification mails (#1401)

Hervé Saint-Amand notifications at github.com
Mon Jan 16 23:10:02 UTC 2017


saintamh commented on this pull request.



>        assert_match confirm_regex, part.body.to_s
     end
-    confirm_string = register_email.parts[0].body.match(confirm_regex)[1]
+    confirm_string = email_text_parts(register_email)[0].body.match(confirm_regex)[1]

`email_text_parts` returns those parts that have a content-type matching `text/*`, i.e. it includes both text and HTML parts. Really it's just there to avoid trying to match a regex against image data.

Perhaps the name is confusing. `text_and_html_parts` ??

-- 
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/1401
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170116/3fe8c252/attachment.html>


More information about the rails-dev mailing list