Sha256: d3a17507ac95322b0dc64956a39a68eb044ed9b39ab7cc2ee183f0dd21efd7ab

Contents?: true

Size: 437 Bytes

Versions: 7

Compression:

Stored size: 437 Bytes

Contents

class Comment < ActiveRecord::Base
  has_ancestry
  
  belongs_to :commentable, polymorphic: true
  belongs_to :user
  
  validates :commentable_type, presence: true
  validates :commentable_id, presence: true
  validates :user_id, presence: true
  validates :name, presence: true
  validates :text, presence: true
  
  attr_accessible :commentable_type, :commentable_id, :parent_id, :name, :text
  
  COMMENTABLE_TYPES = ['project']
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
voluntary-0.7.1 app/models/comment.rb
voluntary-0.7.0 app/models/comment.rb
voluntary-0.6.0 app/models/comment.rb
voluntary-0.5.2 app/models/comment.rb
voluntary-0.5.1 app/models/comment.rb
voluntary-0.5.0 app/models/comment.rb
voluntary-0.4.0 app/models/comment.rb