File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def pagy_nav(pagy)
4040
4141 # previous button
4242 if pagy . prev
43- html << link_to ( "← Prev" , url_for ( page : pagy . prev ) , class : "glass-button px-4 py-2 rounded-lg text-white hover:bg-white/30 transition-all" )
43+ html << link_to ( "← Prev" , url_for ( request . query_parameters . merge ( page : pagy . prev ) ) , class : "glass-button px-4 py-2 rounded-lg text-white hover:bg-white/30 transition-all" )
4444 else
4545 html << %(<span class="px-4 py-2 rounded-lg text-white/30 cursor-not-allowed">← Prev</span>)
4646 end
@@ -52,7 +52,7 @@ def pagy_nav(pagy)
5252 if item == pagy . page
5353 html << %(<span class="glass-button px-4 py-2 rounded-lg text-blue-500 bg-white/20 font-semibold">#{ item } </span>)
5454 else
55- html << link_to ( item , url_for ( page : item ) , class : "glass-button px-4 py-2 rounded-lg text-white hover:bg-white/30 transition-all" )
55+ html << link_to ( item , url_for ( request . query_parameters . merge ( page : item ) ) , class : "glass-button px-4 py-2 rounded-lg text-white hover:bg-white/30 transition-all" )
5656 end
5757 when String
5858 html << %(<span class="px-4 py-2 text-white/50">#{ item } </span>)
@@ -61,7 +61,7 @@ def pagy_nav(pagy)
6161
6262 # next button
6363 if pagy . next
64- html << link_to ( "Next →" , url_for ( page : pagy . next ) , class : "glass-button px-4 py-2 rounded-lg text-white hover:bg-white/30 transition-all" )
64+ html << link_to ( "Next →" , url_for ( request . query_parameters . merge ( page : pagy . next ) ) , class : "glass-button px-4 py-2 rounded-lg text-white hover:bg-white/30 transition-all" )
6565 else
6666 html << %(<span class="px-4 py-2 rounded-lg text-white/30 cursor-not-allowed">Next →</span>)
6767 end
You can’t perform that action at this time.
0 commit comments