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



77
78
79
# File 'lib/mincer/processors/sorting/processor.rb', line 77

def allowed_sort_attributes
  @scope.attribute_names
end

#default_sort_attributeObject

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



67
68
69
# File 'lib/mincer/processors/sorting/processor.rb', line 67

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



72
73
74
# File 'lib/mincer/processors/sorting/processor.rb', line 72

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