From 445d29d0366a1cb904f28bb9650c3f04334c6206 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 14 Aug 2014 14:38:18 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA=E5=B8=96?= =?UTF-8?q?=E5=AD=90=E7=9A=84=E9=95=BF=E5=BA=A6=E4=B8=8A=E9=99=90=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E8=AE=BE=E7=BD=AE=E4=B8=BA2G=202.=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=96=B0=E5=BB=BA=E8=B4=B4=E5=90=A7=E6=97=B6=E8=B4=B4?= =?UTF-8?q?=E5=90=A7=E7=9A=84=E6=8F=8F=E8=BF=B0=E5=AD=97=E6=AE=B5=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/forum.rb | 2 +- app/models/memo.rb | 2 +- app/views/forums/new.html.erb | 2 +- .../20140814062455_change_forum_description.rb | 9 +++++++++ db/schema.rb | 12 ++++++------ 5 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 db/migrate/20140814062455_change_forum_description.rb diff --git a/app/models/forum.rb b/app/models/forum.rb index cd9c210dd..24b5b15e0 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -11,7 +11,7 @@ class Forum < ActiveRecord::Base 'creator_id' validates_presence_of :name, :creator_id, :description validates_length_of :name, maximum: 50 - validates_length_of :description, maximum: 255 + #validates_length_of :description, maximum: 255 validates :name, :uniqueness => true acts_as_taggable diff --git a/app/models/memo.rb b/app/models/memo.rb index 5a909f782..2c0d3571f 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -8,7 +8,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: 3072 validate :cannot_reply_to_locked_topic, :on => :create acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC" diff --git a/app/views/forums/new.html.erb b/app/views/forums/new.html.erb index 19c911c37..2e8924c90 100644 --- a/app/views/forums/new.html.erb +++ b/app/views/forums/new.html.erb @@ -4,7 +4,7 @@ @nav_dispaly_main_contest_label = 1 %> <% @nav_dispaly_forum_label = 1%> -