in moderation auto-message, tell the user it's automated

This commit is contained in:
joshua stein 2014-01-07 11:40:36 -06:00
parent 1452e1c34d
commit c576f86e4d

View file

@ -30,7 +30,7 @@ class Moderation < ActiveRecord::Base
m.body << "\n" <<
"The reason given:\n" <<
"\n" <<
"> *#{self.reason}*"
"> *#{self.reason}*\n"
end
elsif self.comment
@ -39,13 +39,13 @@ class Moderation < ActiveRecord::Base
m.body = "Your comment on [#{self.comment.story.title}](" <<
"#{self.comment.story.comments_url}) has been moderated:\n" <<
"\n" <<
"> *#{self.comment.comment}*"
"> *#{self.comment.comment}*\n"
if self.reason.present?
m.body << "\n" <<
"The reason given:\n" <<
"\n" <<
"> *#{self.reason}*"
"> *#{self.reason}*\n"
end
else
@ -53,6 +53,9 @@ class Moderation < ActiveRecord::Base
return
end
m.body << "\n" <<
"*This is an automated message.*"
m.save
end
end