fixed 发贴标题长度增加200

This commit is contained in:
xxq250 2023-08-15 11:02:41 +08:00
parent 5191f438fb
commit 52cfbeff3b
1 changed files with 1 additions and 1 deletions

View File

@ -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