parent
602e3dc3fa
commit
7aa5eef2e4
@ -1,16 +1,18 @@
|
|||||||
class Course < ActiveRecord::Base
|
class Course < ActiveRecord::Base
|
||||||
include Redmine::SafeAttributes
|
include Redmine::SafeAttributes
|
||||||
|
|
||||||
attr_accessible :code, :extra, :name, :state, :tea_id, :time , :location
|
attr_accessible :code, :extra, :name, :state, :tea_id, :time , :location, :state
|
||||||
belongs_to :project, :class_name => 'Project', :foreign_key => :extra
|
belongs_to :project, :class_name => 'Project', :foreign_key => :extra
|
||||||
has_many :bid
|
has_many :bid
|
||||||
validates_presence_of :code, :time, :location, :name
|
validates_presence_of :time
|
||||||
safe_attributes 'extra',
|
safe_attributes 'extra',
|
||||||
'time',
|
'time',
|
||||||
'name',
|
'name',
|
||||||
'extra',
|
'extra',
|
||||||
'code',
|
'code',
|
||||||
'location'
|
'location',
|
||||||
|
'tea_id',
|
||||||
|
'state'
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue