Class: Toller::Sorts::OrderHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/toller/sorts/order_handler.rb

Overview

Order handler for filter

Instance Method Summary collapse

Instance Method Details

#call(collection, direction, properties) ⇒ Object



9
10
11
12
13
# File 'lib/toller/sorts/order_handler.rb', line 9

def call(collection, direction, properties)
  field_name = properties[:field]

  collection.order(field_name => direction)
end