课程所包含的子功能模块(enabled_modules)相关逻辑修改
This commit is contained in:
parent
d87b52bedd
commit
c43bf84e42
|
@ -22,8 +22,9 @@ class Member < ActiveRecord::Base
|
||||||
has_many :roles, :through => :member_roles
|
has_many :roles, :through => :member_roles
|
||||||
|
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
belongs_to :course
|
||||||
|
|
||||||
validates_presence_of :principal, :project
|
validates_presence_of :principal
|
||||||
validates_uniqueness_of :user_id, :scope => :project_id
|
validates_uniqueness_of :user_id, :scope => :project_id
|
||||||
validate :validate_role
|
validate :validate_role
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue