From 3f470ff0d54a5eb5f95df23d757a433d87543be5 Mon Sep 17 00:00:00 2001
From: Domizio Demichelis
Date: Tue, 11 Jun 2024 19:53:10 +0700
Subject: [PATCH] Indentation changes
---
gem/lib/pagy/frontend.rb | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gem/lib/pagy/frontend.rb b/gem/lib/pagy/frontend.rb
index 6d2410ec5..772cc957f 100644
--- a/gem/lib/pagy/frontend.rb
+++ b/gem/lib/pagy/frontend.rb
@@ -40,9 +40,12 @@ def pagy_nav(pagy, id: nil, aria_label: nil, **vars)
def pagy_info(pagy, id: nil, item_name: nil)
id = %( id="#{id}") if id
p_count = pagy.count
- key = if p_count.zero? then 'pagy.info.no_items'
- elsif pagy.pages == 1 then 'pagy.info.single_page'
- else 'pagy.info.multiple_pages' # rubocop:disable Lint/ElseLayout
+ key = if p_count.zero?
+ 'pagy.info.no_items'
+ elsif pagy.pages == 1
+ 'pagy.info.single_page'
+ else
+ 'pagy.info.multiple_pages'
end
%(#{
@@ -51,7 +54,7 @@ def pagy_info(pagy, id: nil, item_name: nil)
})
end
- # Return a performance optimized lambda to generate the HtML anchor element (a tag)
+ # Return a performance optimized lambda to generate the HTML anchor element (a tag)
# Benchmarked on a 20 link nav: it is ~22x faster and uses ~18x less memory than rails' link_to
def pagy_anchor(pagy)
a_string = pagy.vars[:anchor_string]