mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 20:25:45 +08:00
fix: issues and pull_request length calculate
This commit is contained in:
@@ -23,7 +23,7 @@ class JournalsController < ApplicationController
|
||||
normal_status(-1, "评论内容不能为空")
|
||||
else
|
||||
ActiveRecord::Base.transaction do
|
||||
Journals::CreateForm.new({notes: notes.to_s.strip}).validate!
|
||||
Journals::CreateForm.new({notes: notes.to_s.strip.b}).validate!
|
||||
journal_params = {
|
||||
journalized_id: @issue.id ,
|
||||
journalized_type: "Issue",
|
||||
@@ -75,7 +75,7 @@ class JournalsController < ApplicationController
|
||||
def update
|
||||
content = params[:content]
|
||||
if content.present?
|
||||
Journals::UpdateForm.new({notes: notes.to_s.strip}).validate!
|
||||
Journals::UpdateForm.new({notes: notes.to_s.strip.b}).validate!
|
||||
if @journal.update_attribute(:notes, content)
|
||||
normal_status(0, "更新成功")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user