Module: Mincer::Processors::SortOptions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/mincer/processors/sort.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#allowed_sort_attributes ⇒ Object
Allowed sort attributes, should return array of strings.
-
#default_sort_attribute ⇒ Object
Default sort attribute.
-
#default_sort_order ⇒ Object
Default order attribute.
Instance Method Details
#allowed_sort_attributes ⇒ Object
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_attribute ⇒ Object
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_order ⇒ Object
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 |