added pixiv proxy, report mailer

This commit is contained in:
albert
2010-02-24 16:00:52 -05:00
parent 55700efeb1
commit cd0aa75dbc
5 changed files with 120 additions and 3 deletions

View File

@@ -9,7 +9,8 @@ class Comment < ActiveRecord::Base
attr_accessor :do_not_bump_post
scope :recent, :order => "comments.id desc", :limit => 6
scope :search_body, lambda {|query| {:conditions => ["body_index @@ plainto_tsquery(?)", query], :order => "id desc"}}
scope :search_body, lambda {|query| where("body_index @@ plainto_tsquery(?)", query)}
scope :hidden, lambda {|user| where("score < ?", user.comment_threshold)}
def update_last_commented_at
return if do_not_bump_post