This commit is contained in:
albert
2011-05-29 03:47:06 -04:00
parent 969185ad24
commit 9e287726e3
18 changed files with 237 additions and 137 deletions

View File

@@ -14,8 +14,7 @@ class Comment < ActiveRecord::Base
scope :hidden, lambda {|user| where("score < ?", user.comment_threshold)}
scope :post_tag_match, lambda {|query| joins(:post).where("posts.tag_index @@ to_tsquery('danbooru', ?)", query)}
search_method :body_matches
search_method :post_tag_match
search_methods :body_matches, :post_tag_match
def initialize_creator
self.creator_id = CurrentUser.user.id