lib/builder.rb in sinatra_resource-0.4.19 vs lib/builder.rb in sinatra_resource-0.4.20
- old
+ new
@@ -70,10 +70,11 @@
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, document_count, ITEMS_PER_PAGE)
+ log_event(:get_many, params)
display(:list, resources, resource_config)
end
else
child_assoc = @child_assoc
parent_model = @parent_model
@@ -88,9 +89,10 @@
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, document_count, ITEMS_PER_PAGE)
+ log_event(:get_many, params)
display(:list, resources, resource_config, parent_id)
end
end
end