Adds unmoderated support through changing approved to state.

This commit is contained in:
Philip Arndt 2010-08-11 16:38:53 +12:00
parent 64c036501c
commit ac0b754237
3 changed files with 9 additions and 3 deletions

View file

@ -4,8 +4,9 @@ class BlogComment < ActiveRecord::Base
acts_as_indexed :fields => [:name, :email, :body]
named_scope :approved, :conditions => {:approved => true}
named_scope :rejected, :conditions => {:approved => false}
named_scope :unmoderated, :conditions => {:state => nil}
named_scope :approved, :conditions => {:state => 'approved'}
named_scope :rejected, :conditions => {:state => 'rejected'}
module Moderation
class << self