From 941cbca8e8f53d8e32c672d15dba0bd654c26b40 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Mon, 8 Jan 2024 09:14:02 +1100 Subject: [PATCH] Standard fixes --- lib/adamantium/views/context.rb | 2 +- slices/admin/views/photos/index.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/adamantium/views/context.rb b/lib/adamantium/views/context.rb index c0bd98c..3c0265d 100644 --- a/lib/adamantium/views/context.rb +++ b/lib/adamantium/views/context.rb @@ -2,7 +2,7 @@ module Adamantium module Views class Context < Hanami::View::Context include Hanami::View::ContextHelpers::ContentHelpers - + include Deps["repos.page_repo"] def initialize(**options) diff --git a/slices/admin/views/photos/index.rb b/slices/admin/views/photos/index.rb index 350d2cb..1eeea19 100644 --- a/slices/admin/views/photos/index.rb +++ b/slices/admin/views/photos/index.rb @@ -14,7 +14,7 @@ module Admin private_expose :available_paths do Dir["#{MEDIA_DIR}*"] .map { |path| [path, path.split("-").reverse.join(" — ")] } - .sort { |a,b| a[1] <=> b[1] } + .sort_by { |a| a[1] } .reverse .reject do |path| IGNORE_PATHS.any? { |ip| path[0].match(ip) }