Skip to content

Commit

Permalink
Merge pull request #526 from BrunoChauvet/fix/fetch_all_products
Browse files Browse the repository at this point in the history
Fetch all products when displaying marketplace
  • Loading branch information
BrunoChauvet authored Oct 11, 2017
2 parents 418d325 + 4046ddf commit 50560fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def index
response.headers['X-Total-Count'] = @products.count
else
query = MnoEnterprise::Product.apply_query_params(params).includes(DEPENDENCIES)
@products = query.to_a
@products = MnoEnterprise::Product.fetch_all(query)
response.headers['X-Total-Count'] = query.meta.record_count
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def index
query = query.with_params(_metadata: { organization_id: parent_organization.id })
end

@products = query.to_a
@products = MnoEnterprise::Product.fetch_all(query)
response.headers['X-Total-Count'] = query.meta.record_count
end

Expand Down

0 comments on commit 50560fd

Please sign in to comment.