From 08fe1c453cbed78dba5910a061c8f936b54d0088 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 4 May 2020 02:58:39 -0500 Subject: [PATCH] BURs: remove "Reason: " prefix from forum posts. Don't automatically prepend "Reason: " in front of the BUR reason since this isn't always desirable. --- app/models/bulk_update_request.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/models/bulk_update_request.rb b/app/models/bulk_update_request.rb index 3b664100b..bd3207102 100644 --- a/app/models/bulk_update_request.rb +++ b/app/models/bulk_update_request.rb @@ -89,8 +89,9 @@ class BulkUpdateRequest < ApplicationRecord def create_forum_topic CurrentUser.as(user) do + body = "[bur:#{id}]\n\n#{reason}" self.forum_topic = ForumTopic.create(title: title, category_id: 1, creator: user) unless forum_topic.present? - self.forum_post = forum_topic.forum_posts.create(body: reason_with_link, creator: user) unless forum_post.present? + self.forum_post = forum_topic.forum_posts.create(body: body, creator: user) unless forum_post.present? save end end @@ -125,10 +126,6 @@ class BulkUpdateRequest < ApplicationRecord include ApprovalMethods include ValidationMethods - def reason_with_link - "[bur:#{id}]\n\nReason: #{reason}" - end - def script_with_links tokens = AliasAndImplicationImporter.tokenize(script) lines = tokens.map do |token|