Create changeset_comments resources for users

This commit is contained in:
Anton Khorev 2025-01-19 04:11:06 +03:00
parent 9fbe52dd21
commit 420d9da1f9
7 changed files with 91 additions and 1 deletions

View file

@ -25,6 +25,8 @@ class ChangesetComment < ApplicationRecord
belongs_to :changeset
belongs_to :author, :class_name => "User"
scope :visible, -> { where(:visible => true) }
validates :id, :uniqueness => true, :presence => { :on => :update },
:numericality => { :on => :update, :only_integer => true }
validates :changeset, :associated => true