aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/blog_comment.rb
blob: 7c6b51ff829a9cad999afb7699e282146ee6cd92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
class BlogComment < ActiveRecord::Base

  belongs_to :post, :class_name => 'BlogPost'

  acts_as_indexed :fields => [:name, :email, :body]

  validates_presence_of :title
  validates_uniqueness_of :title

  named_scope :approved, :conditions => {:approved => true}
  named_scope :rejected, :conditions => {:approved => false}
end