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