[openstreetmap/openstreetmap-website] Add a preferred_email_format preference (#1511)

Hervé Saint-Amand notifications at github.com
Mon May 29 20:56:51 UTC 2017


saintamh commented on this pull request.



>      end
   end
 
   private
 
+  def compose_mail(recipient, options = {})
+    needs_avatar = options.include? :attach_avatar
+    avatar_user = options.delete :attach_avatar
+    options[:to] ||= recipient.email
+    mail(options) do |format|
+      if recipient.preferred_email_format == "text_only"
+        format.text
+      else
+        unless recipient.preferred_email_format == "multipart"
+          logger.warn "Unknown email format '#{recipient.preferred_email_format}, treated as 'multipart'"
+        end

Yes, this was more to guard against future changes to the code that wouldn't properly update this method, than against something which can occur in the code as it now is. I'm happy to remove it.

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


More information about the rails-dev mailing list