Class: Kaminari::Fixer

Inherits:
Object
  • Object
show all
Defined in:
lib/kaminari/models/fixer.rb

Class Method Summary collapse

Class Method Details

.do(input_collection, options = {}) ⇒ Object



90
91
92
93
94
95
96
97
98
99
100
# File 'lib/kaminari/models/fixer.rb', line 90

def self.do(input_collection, options = {})
  collection = input_collection
  if collection.is_a?(ThinkingSphinx::Search)
    collection = do_thinking_sphinx(collection, options)
  elsif collection.is_a?(ActiveRecord::Relation) && options[:total]
    collection = do_ar_relation(collection, options)
  elsif collection.is_a?(Array)
    collection = do_array(collection, options)
  end
  collection
end