解决公共贴吧发布内容过长500错误

This commit is contained in:
huang 2015-07-02 16:38:28 +08:00
parent a3070e06e8
commit def0e892af
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class Memo < ActiveRecord::Base
# 若是主题帖,则内容可以是空
#validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? }
validates_length_of :subject, maximum: 50
#validates_length_of :content, maximum: 3072
validates_length_of :content, maximum: 5000
validate :cannot_reply_to_locked_topic, :on => :create
acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC"