Sha256: 963f2ac8e015d90b289bd6b44b534a5caa9ecb97de0ab5745e9d361482463892

Contents?: true

Size: 463 Bytes

Versions: 14

Compression:

Stored size: 463 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', 'vacancy', 'candidature']
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
voluntary-0.3.0 app/models/comment.rb
voluntary-0.2.4 app/models/comment.rb
voluntary-0.2.3 app/models/comment.rb
voluntary-0.2.2 app/models/comment.rb
voluntary-0.2.1 app/models/comment.rb
voluntary-0.2.0 app/models/comment.rb
voluntary-0.1.0 app/models/comment.rb
voluntary-0.1.0.rc4 app/models/comment.rb
voluntary-0.1.0.rc3 app/models/comment.rb
voluntary-0.1.0.rc2 app/models/comment.rb
voluntary-0.1.0.rc1 app/models/comment.rb
voluntary-0.0.3 app/models/comment.rb
voluntary-0.0.2 app/models/comment.rb
voluntary-0.0.1 app/models/comment.rb