Class: MegaOsPath

Inherits:
ApplicationRecord show all
Defined in:
app/models/mega_os_path.rb

Overview

typed: true

Instance Method Summary collapse

Instance Method Details

#comment_countObject



5
6
7
8
9
10
11
# File 'app/models/mega_os_path.rb', line 5

def comment_count
  if comment.present?
    1 + comment.descendants.count
  else
    0
  end
end