From 52cfbeff3b5bebd38a432fca19c22be4ca047fa6 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Tue, 15 Aug 2023 11:02:41 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E5=8F=91=E8=B4=B4=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E5=A2=9E=E5=8A=A0200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/memo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/memo.rb b/app/models/memo.rb index f74f4c396..aa0af8a02 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -20,7 +20,7 @@ class Memo < ApplicationRecord validates_presence_of :author_id, :subject,:content # 若是主题帖,则内容可以是空 #validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? } - validates_length_of :subject, maximum: 50 + validates_length_of :subject, maximum: 200 validate :cannot_reply_to_locked_topic, :on => :create