|
|
@ -36,7 +36,7 @@ class Course < ActiveRecord::Base
|
|
|
|
|
|
|
|
|
|
|
|
validates_presence_of :password, :term,:name
|
|
|
|
validates_presence_of :password, :term,:name
|
|
|
|
validates_format_of :class_period, :with =>/^[1-9]\d*$/
|
|
|
|
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
|
|
|
|
before_save :self_validate
|
|
|
|
after_create :create_board_sync
|
|
|
|
after_create :create_board_sync
|
|
|
|