Sha256: b04a86499542ebe947b4c2833b915bd63e0526593de8e9b39aae425e83e45230

Contents?: true

Size: 307 Bytes

Versions: 1

Compression:

Stored size: 307 Bytes

Contents

class Forem::Post < ActiveRecord::Base
  belongs_to :topic
  belongs_to :user
  belongs_to :reply_to, :class_name => "Post"

  has_many :replies, :class_name => "Post",
                     :foreign_key => "reply_to_id",
                     :dependent => :nullify

  validates :text, :presence => true
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forem-0.0.1 app/models/forem/post.rb