Skip to content

Commit

Permalink
fetch all products when displaying marketplace
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoChauvet committed Oct 11, 2017
1 parent 418d325 commit 4046ddf
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 4046ddf

Please sign in to comment.