work on refactoring search

This commit is contained in:
albert
2013-01-08 15:53:21 -05:00
parent 80f34d08d9
commit 13271e9bf5
19 changed files with 152 additions and 45 deletions

View File

@@ -12,7 +12,6 @@ class ForumTopic < ActiveRecord::Base
validates_associated :original_post
scope :title_matches, lambda {|title| where(["text_index @@ plainto_tsquery(?)", title])}
scope :active, where("is_deleted = false")
search_methods :title_matches
accepts_nested_attributes_for :original_post
def editable_by?(user)