|
|
|
@ -26,14 +26,14 @@ class HelpsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
def feedback
|
|
|
|
|
if params[:url].blank?
|
|
|
|
|
content = "<p>[#{params[:question_kind]}]</p><p>#{params[:description]}</p>"
|
|
|
|
|
content = "[#{params[:question_kind]}]<br>#{params[:description]}<br>"
|
|
|
|
|
if params[:attachment_ids]
|
|
|
|
|
params[:attachment_ids].each do |attachment_id|
|
|
|
|
|
content += "![](/api/attachments/#{attachment_id})\n"
|
|
|
|
|
content += "![](/api/attachments/#{attachment_id})<br>"
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
content = "<p>[#{params[:question_kind]}]</p><p>问题页面网址:#{params[:url]}</p>#{params[:description]}"
|
|
|
|
|
content = "[#{params[:question_kind]}]<br>问题页面网址:#{params[:url]}<br>#{params[:description]}"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
|