From 908254b911517a9a1c7a258cde3847324f5cb96b Mon Sep 17 00:00:00 2001 From: nwb Date: Sat, 19 Jul 2014 09:39:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E3=80=81=E7=AB=9E=E8=B5=9B?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=8F=8F=E8=BF=B0=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E6=82=AC=E5=81=9C=E6=98=BE=E7=A4=BA=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course.rb | 2 +- app/views/welcome/contest.html.erb | 2 +- app/views/welcome/index.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/course.rb b/app/models/course.rb index 45830c719..75bac905c 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -36,7 +36,7 @@ class Course < ActiveRecord::Base validates_presence_of :password, :term,:name validates_format_of :class_period, :with =>/^[1-9]\d*$/ - #validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/ + validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/ before_save :self_validate after_create :create_board_sync diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index b48b5828a..ce2450268 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -166,7 +166,7 @@
- ><%=contest.description.to_s%> + <%=contest.description.truncate(100, omission: '...')%>

diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 586817c40..deeacb322 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -73,7 +73,7 @@ (<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
- ><%=project.description%> + <%=project.description.truncate(100, omission: '...')%>
<%# issue_count = project.issues.count %>