:style => "text-decoration: none; color: #222; font-weight: bold"
)
end
+
+ def message_body(&block)
+ render(
+ partial: "message_body",
+ locals: { body: capture(&block) }
+ )
+ end
end
) %>
</td>
<td style="text-align: left; vertical-align: top; padding-right: 10px">
- <%= captured %>
+ <%= body %>
</td>
</tr>
</table>
<% end %>
</p>
-<%= render "notifier/user_message_table", :captured => capture { %>
+<%= message_body do %>
<%= @comment.to_html %>
-<% } %>
+<% end %>
<p>
<%= raw t 'notifier.changeset_comment_notification.details', :url => content_tag("nobr", link_to(@changeset_url, @changeset_url)) %>
<%= raw t'notifier.diary_comment_notification.header', :from_user => link_to_user(@from_user), :subject => content_tag("em", @title) %>
</p>
-<%= render "notifier/user_message_table", :captured => capture { %>
+<%= message_body do %>
<%= @text.to_html %>
-<% } %>
+<% end %>
<% content_for :footer do %>
<p><%= raw t'notifier.diary_comment_notification.footer',
<p><%= t 'notifier.friend_notification.had_added_you', :user => @friend.befriender.display_name %></p>
-<%= render "notifier/user_message_table", :captured => capture { %>
+<%= message_body do %>
<p><%= raw t 'notifier.friend_notification.see_their_profile', :userurl => link_to(@viewurl, @viewurl) %></p>
<% unless @friend.befriendee.is_friends_with?(@friend.befriender) -%>
<p><%= raw t 'notifier.friend_notification.befriend_them', :befriendurl => link_to(@friendurl, @friendurl) %></p>
<% end -%>
-<% } %>
+<% end %>
%>
</p>
-<%= render "notifier/user_message_table", :captured => capture { %>
+<%= message_body do %>
<%= @text.to_html %>
-<% } %>
+<% end %>
<% content_for :footer do %>
<p>
<p><%= raw t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => link_to_user(@commenter), :place => @place %></p>
<% end %>
-<%= render "notifier/user_message_table", :captured => capture { %>
+<%= message_body do %>
<%= @comment.to_html %>
-<% } %>
+<% end %>
<p><%= raw t 'notifier.note_comment_notification.details', :url => link_to(@noteurl, @noteurl) %></p>