From fce622b5b1959892b6f6ea94bfe3a1c4eb52d8dd Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 14 Oct 2023 11:12:05 -0400 Subject: Added comment replying --- .../comment_mailer/reply_comment_email.html.haml | 14 ++++++++++++++ app/views/comment_mailer/reply_comment_email.text.erb | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 app/views/comment_mailer/reply_comment_email.html.haml create mode 100644 app/views/comment_mailer/reply_comment_email.text.erb (limited to 'app/views/comment_mailer') diff --git a/app/views/comment_mailer/reply_comment_email.html.haml b/app/views/comment_mailer/reply_comment_email.html.haml new file mode 100644 index 0000000..22009ee --- /dev/null +++ b/app/views/comment_mailer/reply_comment_email.html.haml @@ -0,0 +1,14 @@ +%p + A reply has been posted to your comment on + = succeed "." do + = link_to @comment.blog.title, @comment.blog + The original comment: +%blockquote= @comment.reply_to.body +%p + = @comment.username + left the following response: +%blockquote= @comment.body +%p + Posted: + = @comment.published_at.strftime("%B #{@comment.published_at.day.ordinalize}, %Y at %-I:%M:%S%P") +%p= link_to "See the comment on the web", blog_url(@comment.blog, anchor: "comment-#{@comment.id}") diff --git a/app/views/comment_mailer/reply_comment_email.text.erb b/app/views/comment_mailer/reply_comment_email.text.erb new file mode 100644 index 0000000..bd60692 --- /dev/null +++ b/app/views/comment_mailer/reply_comment_email.text.erb @@ -0,0 +1,19 @@ +A reply has been posted to your comment on <%= @comment.blog.title %>. The original comment: + +--- + +<%= @comment.reply_to.body %> + +--- + +<%= @comment.username %> posted the following response: + +--- + +<%= @comment.body %> + +--- + +Posted: <%= @comment.published_at.strftime("%B #{@comment.published_at.day.ordinalize}, %Y at %-I:%M:%S%P") %> + +See the comment on the web: <%= blog_url(@comment.blog, anchor: "comment-#{@comment.id}") %> -- cgit 1.4.1