parent
67be6616b0
commit
a4d3d324ec
6 changed files with 72 additions and 33 deletions
|
@ -26,7 +26,7 @@
|
|||
|
||||
class NoteComment < ApplicationRecord
|
||||
belongs_to :note, :touch => true
|
||||
belongs_to :author, :class_name => "User", :optional => true
|
||||
belongs_to :author, :class_name => "User", :optional => true, :counter_cache => true
|
||||
|
||||
validates :id, :uniqueness => true, :presence => { :on => :update },
|
||||
:numericality => { :on => :update, :only_integer => true }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue