mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 03:35:25 +08:00
7 lines
259 B
Ruby
7 lines
259 B
Ruby
class ProjectComment < ActiveRecord::Base
|
|
validates :comment, :project, presence: true
|
|
validates :project_id, uniqueness: { scope: :comment_id }
|
|
|
|
belongs_to :comment, inverse_of: :project_comment
|
|
belongs_to :project, inverse_of: :project_comments
|
|
end
|