newyslclassrooms
cxt 5 years ago
parent 7ca2f338fe
commit 32a5d5b4d8

@ -330,7 +330,7 @@ class ApplicationController < ActionController::Base
end end
if !User.current.logged? && Rails.env.development? if !User.current.logged? && Rails.env.development?
User.current = User.find 3117 User.current = User.find 1
end end

@ -4,4 +4,5 @@ class CourseVideo < ApplicationRecord
belongs_to :user, optional: true belongs_to :user, optional: true
validates :title, length: { maximum: 60, too_long: "不能超过60个字符" } validates :title, length: { maximum: 60, too_long: "不能超过60个字符" }
validates :link, format: { with: CustomRegexp::URL, message: "必须为网址超链接" }
end end

Loading…
Cancel
Save