Sha256: e8a2ba798419a1cdaf0d29f06464ba2e704b96e6a12728ad2ccaf4df82f7fa48

Contents?: true

Size: 305 Bytes

Versions: 2

Compression:

Stored size: 305 Bytes

Contents

module Dorsale
  class Comment < ActiveRecord::Base
    belongs_to :user,        polymorphic: true
    belongs_to :commentable, polymorphic: true
    has_many :events, as: :eventable, dependent: :destroy
    
    validates :commentable, presence: true
    validates :text,        presence: true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dorsale-1.0.4 app/models/dorsale/comment.rb
dorsale-1.0.3 app/models/dorsale/comment.rb