Permalink
Browse files

changed spam scope to not conflict with instance method

  • Loading branch information...
1 parent 4af8c35 commit 943f172f4fcf84ae3914111e8a055b4c2650a8a1 @aross aross committed Feb 27, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 app/controllers/admin/comments_controller.rb
  2. +2 −2 app/models/comment.rb
@@ -9,7 +9,7 @@ def index
@page_title = "Flagged Comments"
elsif params[:spam]
@page_title = "Spam Comments"
- @teh_comments = Comment.spam.paginate(:page => params[:page], :per_page => 100)
+ @teh_comments = Comment.spamy.paginate(:page => params[:page], :per_page => 100)
else
@page_title = "Comment Moderation"
@teh_comments = Comment.where("censored=?", false).order("created_at ASC").paginate(:page => params[:page], :per_page => 100)
View
@@ -24,7 +24,7 @@ class Comment < ActiveRecord::Base
scope :useless, :conditions => ["comments.plus_score_count - comments.minus_score_count DESC < 0"]
scope :most_useful, :order => ["comments.plus_score_count - comments.minus_score_count DESC"], :limit => 3
scope :uncensored, :conditions => ["censored != ?", true]
- scope :spam, where("comments.spam = ? AND comments.defensio_sig <> ''", true).order("comments.created_at ASC")
+ scope :spamy, where("comments.spam = ? AND comments.defensio_sig <> ''", true).order("comments.created_at ASC")
apply_simple_captcha
validates_presence_of :comment, :message => " : You must enter a comment."
@@ -49,7 +49,7 @@ def author_email
end
def is_spam?
- spam? and !defensio_sig.blank?
+ self.spam? and !defensio_sig.blank?
end
def score_count_sum

0 comments on commit 943f172

Please sign in to comment.