From 060d9fe70a1de0ba9aa592d25d6e7352114aa431 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Mon, 25 Mar 2013 16:17:03 +1100 Subject: Inline method InfoRequest.full_search --- app/models/info_request.rb | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'app/models/info_request.rb') diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 156399b99..4db4dadb0 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -189,21 +189,6 @@ class InfoRequest < ActiveRecord::Base self.comments.find(:all, :conditions => 'visible') end - # Central function to do all searches - # (Not really the right place to put it, but everything can get it here, and it - # does *mainly* find info requests, via their events, so hey) - def InfoRequest.full_search(models, query, order, ascending, collapse, per_page, page) - offset = (page - 1) * per_page - - return ::ActsAsXapian::Search.new( - models, query, - :offset => offset, :limit => per_page, - :sort_by_prefix => order, - :sort_by_ascending => ascending, - :collapse_by_prefix => collapse - ) - end - # If the URL name has changed, then all request: queries will break unless # we update index for every event. Also reindex if prominence changes. after_update :reindex_some_request_events -- cgit v1.2.3