Class: JsonapiCompliable::Scope::Sort
- Inherits:
-
Scope::Base
- Object
- Scope::Base
- JsonapiCompliable::Scope::Sort
- Defined in:
- lib/jsonapi_compliable/scope/sort.rb
Instance Method Summary collapse
Instance Method Details
#apply_custom_scope ⇒ Object
11 12 13 |
# File 'lib/jsonapi_compliable/scope/sort.rb', line 11 def apply_custom_scope custom_scope.call(@scope, attribute, direction) end |
#apply_standard_scope ⇒ Object
7 8 9 |
# File 'lib/jsonapi_compliable/scope/sort.rb', line 7 def apply_standard_scope @scope.order(attribute => direction) end |
#custom_scope ⇒ Object
3 4 5 |
# File 'lib/jsonapi_compliable/scope/sort.rb', line 3 def custom_scope dsl.sorting end |