Module: Mincer::Processors::Sorting::Options

Extended by:
ActiveSupport::Concern
Defined in:
lib/mincer/processors/sorting/processor.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#allowed_sort_attributesObject

Allowed sort attributes, should return array of strings



75
76
77
# File 'lib/mincer/processors/sorting/processor.rb', line 75

def allowed_sort_attributes
  @scope.attribute_names
end

#default_sort_attributeObject

Default sort attribute. You must override this method if you want something else



65
66
67
# File 'lib/mincer/processors/sorting/processor.rb', line 65

def default_sort_attribute
  ::Mincer.config.sorting.sort_attribute
end

#default_sort_orderObject

Default order attribute. You must override this method if you want something else



70
71
72
# File 'lib/mincer/processors/sorting/processor.rb', line 70

def default_sort_order
  ::Mincer.config.sorting.order_attribute
end