class Toller::Sorts::ScopeHandler

Scope handler for sort

Public Instance Methods

call(collection, direction, properties) click to toggle source
# File lib/toller/sorts/scope_handler.rb, line 9
def call(collection, direction, properties)
  scoped_name = properties[:scope_name] || properties[:field]

  collection.public_send(scoped_name, direction)
end