diff options
author | Philip Arndt <parndt@gmail.com> | 2010-08-11 16:38:53 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2010-08-11 16:38:53 +1200 |
commit | ac0b754237045f6139106bd04e56b398e89ff9bd (patch) | |
tree | 3c532102404c5f796e22c691b7bb71bd1d080edd /app/models/blog_comment.rb | |
parent | 64c036501c9cd6f1ddd98dbfdfdf0436ed706283 (diff) | |
download | refinerycms-blog-ac0b754237045f6139106bd04e56b398e89ff9bd.tar.gz refinerycms-blog-ac0b754237045f6139106bd04e56b398e89ff9bd.tar.bz2 refinerycms-blog-ac0b754237045f6139106bd04e56b398e89ff9bd.zip |
Adds unmoderated support through changing approved to state.
Diffstat (limited to 'app/models/blog_comment.rb')
-rw-r--r-- | app/models/blog_comment.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index d9e1917..cab2227 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -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 |