2013-08-01 20:26:19 +08:00
|
|
|
class Share < ActiveRecord::Base
|
2013-10-21 08:57:55 +08:00
|
|
|
include Redmine::SafeAttributes
|
|
|
|
attr_accessible :created_on, :share_type, :title, :url,:project_id,:user_id, :description
|
|
|
|
|
|
|
|
validates_presence_of :project_id
|
|
|
|
|
|
|
|
belongs_to :project
|
|
|
|
belongs_to :user
|
|
|
|
|
|
|
|
safe_attributes 'project_id',
|
|
|
|
'user_id',
|
|
|
|
'url',
|
|
|
|
'title',
|
|
|
|
'share_type',
|
|
|
|
'crated_on',
|
|
|
|
'description'
|
|
|
|
|
2013-08-01 20:26:19 +08:00
|
|
|
end
|