sort media

This commit is contained in:
2023-09-16 10:39:57 +10:00
parent e08dd5b79f
commit f2a1871f24

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}/**"]
memo[root.gsub(MEDIA_DIR, "")] = Dir["#{root}/**"].sort {|a,b| File.ctime(a) <=> File.ctime(b) }
end
end