12 lines
300 B
Ruby
12 lines
300 B
Ruby
|
class MemoMessage < ActiveRecord::Base
|
||
|
attr_accessible :forum_id, :memo_id, :memo_type, :user_id, :viewed
|
||
|
|
||
|
belongs_to :memo
|
||
|
belongs_to :user
|
||
|
|
||
|
validates :user_id,presence: true
|
||
|
validates :forum_id,presence: true
|
||
|
validates :memo_id,presence: true
|
||
|
validates :memo_type, presence: true
|
||
|
end
|