reverse media sorting

This commit is contained in:
2023-09-16 10:45:03 +10:00
parent c5e55cd641
commit 5ff6fc586f

View File

@@ -7,7 +7,7 @@ module Admin
expose :photos_buckets do |available_paths|
available_paths.each_with_object({}) do |root, memo|
memo[root.gsub(MEDIA_DIR, "")] = Dir["#{root}/**"].sort {|a,b| File.ctime(a) <=> File.ctime(b) }
memo[root.gsub(MEDIA_DIR, "")] = Dir["#{root}/**"].sort {|a,b| File.ctime(b) <=> File.ctime(a) }
end
end