Skip to content

Commit

Permalink
Update pages_controller.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Shpigford committed Nov 12, 2024
1 parent f66dac4 commit 7e92bd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def sitemap
# Paginate stocks
@stocks = Stock.order(name: :asc)
.where.not(mic_code: nil)
.offset((@page - 1) * 45_000)
.limit(45_000)
.offset((@page - 1) * 20_000)
.limit(20_000)

respond_to do |format|
format.xml
Expand All @@ -67,7 +67,7 @@ def sitemap
# @return [XML] Sitemap index file
def sitemap_index
@total_stocks = Stock.where.not(mic_code: nil).count
@sitemap_count = (@total_stocks / 45_000.0).ceil # Using 45k to leave room for other URLs
@sitemap_count = (@total_stocks / 20_000.0).ceil # Using 20k to leave room for other URLs

respond_to do |format|
format.xml
Expand Down

0 comments on commit 7e92bd2

Please sign in to comment.