From f34fc80a632e1be44365bb5f04cbadc77b75c48c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 26 Nov 2019 15:34:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF=E7=9A=84?= =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/helps_controller.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/helps_controller.rb b/app/controllers/helps_controller.rb index 9aefb5129..a32aba62f 100644 --- a/app/controllers/helps_controller.rb +++ b/app/controllers/helps_controller.rb @@ -25,7 +25,14 @@ class HelpsController < ApplicationController end def feedback - content = "
[#{params[:question_kind]}]
问题页面网址:#{params[:url]}
#{params[:description]}" + if params[:url].blank? + content = "[#{params[:question_kind]}]
#{params[:description]}" + params[:attachment_ids].each do |attachment_id| + content += "![](/api/attachments/#{attachment_id})↵" + end + else + content = "[#{params[:question_kind]}]
问题页面网址:#{params[:url]}
#{params[:description]}" + end ActiveRecord::Base.transaction do attr = { sender_id: User.current.id, receiver_id: 1, content: content, send_time: Time.now }