lib/builder.rb in sinatra_resource-0.4.5 vs lib/builder.rb in sinatra_resource-0.4.6

- old
+ new

@@ -68,11 +68,11 @@ role = lookup_role(nil) page = get_page(params) documents = documents_for_get_many(role, model, resource_config, page, ITEMS_PER_PAGE, true, nil, nil) document_count = document_count_for_get_many(model, resource_config, nil, nil) page_count = calculate_page_count(document_count, ITEMS_PER_PAGE) - resources = build_resources(documents, resource_config, page, page_count) + resources = build_resources(documents, resource_config, page, page_count, document_count, ITEMS_PER_PAGE) display(:list, resources, resource_config) end else child_assoc = @child_assoc parent_model = @parent_model @@ -86,10 +86,10 @@ role = lookup_role(nil) page = get_page(params) documents = documents_for_get_many(role, model, resource_config, page, ITEMS_PER_PAGE, true, parent_document, child_assoc) document_count = document_count_for_get_many(model, resource_config, parent_document, child_assoc) page_count = calculate_page_count(document_count, ITEMS_PER_PAGE) - resources = build_resources(documents, resource_config, page, page_count) + resources = build_resources(documents, resource_config, page, page_count, document_count, ITEMS_PER_PAGE) display(:list, resources, resource_config, parent_id) end end end