[openstreetmap/openstreetmap-website] Fix element pagination width calculation (PR #5211)
Tom Hughes
notifications at github.com
Sat Sep 14 10:00:00 UTC 2024
@tomhughes commented on this pull request.
> @@ -86,7 +86,7 @@ def sidebar_classic_pagination(pages, page_param)
max_width_for_default_padding = 35
width = 0
- pagination_items(pages, {}).each do |body|
+ pagination_items(pages, {}).each do |(body)|
Using `each_key` won't work anyway as it's only defined on hashes. Dropping the `each` and making `pagination_items` yield the items directly instead of building a list and returning it does then allow the syntax I wanted without warnings but as you say maybe these should be hashes if that allows us to get rid of the `page_or_class` duality thing.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5211#discussion_r1759708942
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5211/review/2304419366 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240914/04d4b632/attachment.htm>
More information about the rails-dev
mailing list