Class: JsonapiCompliable::Scope::Paginate
- Inherits:
-
Base
- Object
- Base
- JsonapiCompliable::Scope::Paginate
show all
- Defined in:
- lib/jsonapi_compliable/scope/paginate.rb
Constant Summary
collapse
- MAX_PAGE_SIZE =
1_000
Instance Attribute Summary
Attributes inherited from Base
#controller, #dsl, #params, #scope
Instance Method Summary
collapse
Methods inherited from Base
#apply_standard_or_override, #apply_standard_scope?, #initialize
Instance Method Details
#apply_custom_scope ⇒ Object
22
23
24
|
# File 'lib/jsonapi_compliable/scope/paginate.rb', line 22
def apply_custom_scope
custom_scope.call(@scope, number, size)
end
|
#apply_standard_scope ⇒ Object
18
19
20
|
# File 'lib/jsonapi_compliable/scope/paginate.rb', line 18
def apply_standard_scope
@scope.page(number).per(size)
end
|
#custom_scope ⇒ Object
14
15
16
|
# File 'lib/jsonapi_compliable/scope/paginate.rb', line 14
def custom_scope
dsl.
end
|