body chunking???

This commit is contained in:
Devin Howard 2016-11-25 17:21:34 -05:00
parent c154716346
commit 6415725ad6
3 changed files with 6 additions and 4 deletions

View file

@ -22,7 +22,7 @@ class AccessController < ApplicationController
request = AccessRequest.create(user: current_user, map: @map)
# what about push notification to map owner?
mail = MapMailer.access_request_email(request, @map)
@map.user.notify(mail.subject, mail.body.parts[0])
@map.user.notify(mail.subject, mail.body)
respond_to do |format|
format.json do
@ -40,7 +40,7 @@ class AccessController < ApplicationController
# who we then send an email to
user = User.find(user_id)
mail = MapMailer.invite_to_edit_email(@map, current_user, User.find(user_id))
user.notify(mail.subject, mail.body.parts[0])
user.notify(mail.subject, mail.body)
end
@map.remove_old_collaborators(user_ids)

View file

@ -4,6 +4,7 @@
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
</head>
<body>
<%= raw @notification.body %>
<% binding.pry %>
<%= raw @notification.body.parts[1].encoded %>
</body>
</html>

View file

@ -1 +1,2 @@
<%= @notification.body.html_safe? ? @notification.body : strip_tags(@notification.body) %>
<% body = @notification.body.parts[0].encoded %>
<%= body.html_safe? ? body : strip_tags(body) %>