fixed comment test

This commit is contained in:
albert
2011-05-16 09:27:06 -04:00
parent 903a3fa5d1
commit 158810d9f0
20 changed files with 174 additions and 58 deletions

View File

@@ -34,6 +34,7 @@ class Post < ActiveRecord::Base
scope :deleted, where(["is_deleted = ?", true])
scope :visible, lambda {|user| Danbooru.config.can_user_see_post_conditions(user)}
scope :commented_before, lambda {|date| where("last_commented_at < ?", date).order("last_commented_at DESC")}
scope :noted_before, lambda {|date| where("last_noted_at < ?", date).order("last_noted_at DESC")}
scope :for_user, lambda {|user_id| where(["uploader_string = ?", "uploader:#{user_id}"])}
scope :available_for_moderation, lambda {where(["id NOT IN (SELECT pd.post_id FROM post_disapprovals pd WHERE pd.user_id = ?)", CurrentUser.id])}
scope :hidden_from_moderation, lambda {where(["id IN (SELECT pd.post_id FROM post_disapprovals pd WHERE pd.user_id = ?)", CurrentUser.id])}