19 lines
383 B
Ruby
19 lines
383 B
Ruby
class Course < ActiveRecord::Base
|
|
include Redmine::SafeAttributes
|
|
|
|
attr_accessible :code, :extra, :name, :state, :tea_id, :time , :location, :state
|
|
belongs_to :project, :class_name => 'Project', :foreign_key => :extra
|
|
has_many :bid
|
|
validates_presence_of :time
|
|
safe_attributes 'extra',
|
|
'time',
|
|
'name',
|
|
'extra',
|
|
'code',
|
|
'location',
|
|
'tea_id',
|
|
'state'
|
|
|
|
|
|
end
|