scinote-web/app/models/task_comment.rb

9 lines
208 B
Ruby
Raw Normal View History

class TaskComment < Comment
2017-06-28 21:21:32 +08:00
belongs_to :my_module,
foreign_key: :associated_id,
inverse_of: :task_comments,
optional: true
validates :my_module, presence: true
end