Class: AbstractSearch

Inherits:
Search
  • Object
show all
Defined in:
app/models/abstract_search.rb

Overview

This is only used in the Abstract app and only seems to use :merged Everything else is unused.

Instance Method Summary collapse

Methods inherited from Search

attr_accessors, #attr_accessors, attr_accessors=, #search_order, searchable_attributes, #searchable_attributes, searchable_attributes=, #valid_orders, valid_orders, valid_orders=

Instance Method Details

#abstractsObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/models/abstract_search.rb', line 13

def abstracts
  @abstracts ||= Abstract.send(
    (paginate?)?'paginate':'all',{
      :order => search_order,
      :joins => joins,
      :conditions => conditions
    }.merge(
      (paginate?)?{
        :per_page => per_page||25,
        :page     => page||1
      }:{}
    )
  )
end