diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index e41e2a43..46be2ef4 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -359,7 +359,7 @@ class AttachmentsController < ApplicationController saved = @attachment.save respond_to do |format| format.js - format.json { render json: { attachment_id: @attachment.id, url: download_attachment_path(@attachment.id) } } + format.json { render json: { attachment_id: @attachment.id, url: "/api/attachments/#{@attachment.id}"} } format.api { if saved render :action => 'upload', :status => :created @@ -380,7 +380,7 @@ class AttachmentsController < ApplicationController render json: { success: saved ? 1 : 0, # | 1, // 0 表示上传失败,1 表示上传成功 message: "上传信息:#{ @attachment.errors.full_messages.join(',') }", - url: download_attachment_path(@attachment.id), # 上传成功时才返回 + url: "/api/attachments/#{@attachment.id}", # 上传成功时才返回 attachment_id: @attachment.id } end @@ -413,7 +413,7 @@ class AttachmentsController < ApplicationController render json: { success: saved ? 1 : 0, # | 1, // 0 表示上传失败,1 表示上传成功 message: "上传失败:#{ @attachment.errors.full_messages.join(',') }", - url: download_attachment_path(@attachment.id) # 上传成功时才返回 + url: "/api/attachments/#{@attachment.id}" # 上传成功时才返回 } end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 39298061..aac2a843 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5690,7 +5690,8 @@ end def download_named_attachment_url_without_domain(id, filename, option={}) attachment_id = (Attachment === id ? id.id : id) - Setting.protocol + "://" + Setting.host_name + "/attachments/download/" + attachment_id.to_s + "/" + filename + # Setting.protocol + "://" + Setting.host_name + "/attachments/download/" + attachment_id.to_s + "/" + filename + "/api/attachments/" + attachment_id.to_s end def named_attachment_url_without_domain(id, filename, option={}) diff --git a/app/models/tiding.rb b/app/models/tiding.rb index 7204abc5..0cc335a5 100644 --- a/app/models/tiding.rb +++ b/app/models/tiding.rb @@ -254,7 +254,7 @@ class Tiding < ActiveRecord::Base elsif self.tiding_type == "Comment" container.present? ? ("评论了你" + (container.parent.present? ? "的回复:" : "发布的项目issue:") + message_content(container.notes)) : "" else - container.present? ? "更新了Issue:#{container.try(:issue).try(:subject)}" : "" + "更新了Issue:#{container.try(:issue).try(:subject)}" end when 'Issue' "指派了Issue给你:" + container.subject diff --git a/app/views/account/_user_update_notice.html.erb b/app/views/account/_user_update_notice.html.erb index ca438f35..0fa17fae 100644 --- a/app/views/account/_user_update_notice.html.erb +++ b/app/views/account/_user_update_notice.html.erb @@ -1,7 +1,7 @@
<%= notice.try(:subject) %>
<%= notice.try(:notes) %>+
<%= notice.try(:notes).try(:rstrip) %>
diff --git a/app/views/libraries/_form.html.erb b/app/views/libraries/_form.html.erb index c71bc7c1..c5bb2ecd 100644 --- a/app/views/libraries/_form.html.erb +++ b/app/views/libraries/_form.html.erb @@ -73,7 +73,7 @@
diff --git a/app/views/managements/_training_item.html.erb b/app/views/managements/_training_item.html.erb index ceb1f055..50e856fa 100644 --- a/app/views/managements/_training_item.html.erb +++ b/app/views/managements/_training_item.html.erb @@ -8,7 +8,7 @@
平台拟于2019年7月22日10:40--2019年7月22号11:00进行全面升级,带来不便,敬请谅解!
-