Sha256: 094aa0ee56c0482dc4d00ecba3db5afec6169d21ac9f42a27340609bd50f6c96

Contents?: true

Size: 205 Bytes

Versions: 2

Compression:

Stored size: 205 Bytes

Contents

# typed: true
class MegaOsPath < ApplicationRecord
  belongs_to :comment, optional: true

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

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
ezii-browser-1.0.0 server/redux-os/app/models/mega_os_path.rb
mega-os-1.0.0 app/models/mega_os_path.rb