Skip to content

Commit

Permalink
Update pagination limit to 25 and adjust navigation rendering in fund…
Browse files Browse the repository at this point in the history
… search
  • Loading branch information
andrew committed Feb 24, 2025
1 parent fbceb1c commit 45b4a84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/views/funds/search.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
</div>
</div>
<% end %>
<%== pagy_bootstrap_nav(@pagy) if @pagy.pages > 1 %>
<% else %>
<div class="row">
<div class="col-md-4">
Expand All @@ -54,12 +55,10 @@
<a href="mailto:[email protected]" class="btn btn-primary">Contact us</a>
</div>
</div>

<% end %>
<% else %>
<div class="listing-controls rounded p-3 mb-5"><p class="mb-0">Searching <strong><%= Fund.count %></strong> funds</p></div>
<% end %>
<%== pagy_bootstrap_nav(@pagy) if @pagy.pages > 1 %>
</div>
<div class="col-lg-3">
<% if @funds.any? %>
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/pagy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'pagy/extras/array'
require 'pagy/extras/overflow'

Pagy::DEFAULT[:limit] = 100
Pagy::DEFAULT[:limit] = 25
Pagy::DEFAULT[:limit_param] = :per_page
Pagy::DEFAULT[:limit_max] = 1000
Pagy::DEFAULT[:overflow] = :empty_page

0 comments on commit 45b4a84

Please sign in to comment.