It would be great to be able to get the total number for a given model when requesting a page from the index:
|
def index |
|
query = resource.where(permitted_params).order(order_params).paginate(pagination_params) |
|
yield query if block_given? |
|
query = filters(query) |
|
body = {resource_key.pluralize => query} |
|
render_processed_entity(body) |
|
end |
It would be great to be able to get the total number for a given model when requesting a page from the index:
generalized_api/lib/generalized_api/api.rb
Lines 10 to 16 in 093ea7b