scinote-web/app/models/project_comment.rb

12 lines
236 B
Ruby
Raw Normal View History

2019-05-09 17:10:02 +02:00
# frozen_string_literal: true
class ProjectComment < Comment
2019-05-09 17:10:02 +02:00
belongs_to :project, foreign_key: :associated_id, inverse_of: :project_comments, touch: true
2016-02-12 16:52:43 +01:00
validates :project, presence: true
2020-11-20 12:29:40 +01:00
def commentable
project
end
2016-02-12 16:52:43 +01:00
end