Module: Mincer::Processors::SortOptions

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

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#allowed_sort_attributesObject

Allowed sort attributes, should return array of strings



53
54
55
# File 'lib/mincer/processors/sort.rb', line 53

def allowed_sort_attributes
  @scope.attribute_names
end

#default_sort_attributeObject

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



43
44
45
# File 'lib/mincer/processors/sort.rb', line 43

def default_sort_attribute
  'id'
end

#default_sort_orderObject

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



48
49
50
# File 'lib/mincer/processors/sort.rb', line 48

def default_sort_order
  'ASC'
end