Fix reverse cron ordering
This commit is contained in:
@@ -2,7 +2,7 @@ div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:
|
|||||||
h1 Admin // Media
|
h1 Admin // Media
|
||||||
|
|
||||||
div class="mb-4 max-w-prose mx-auto prose dark:prose-invert"
|
div class="mb-4 max-w-prose mx-auto prose dark:prose-invert"
|
||||||
- photos_buckets.reverse.each do |year, photos|
|
- photos_buckets.each do |year, photos|
|
||||||
- next unless photos.count > 0
|
- next unless photos.count > 0
|
||||||
h2 = Date.parse(year).strftime("%m %b %Y")
|
h2 = Date.parse(year).strftime("%m %b %Y")
|
||||||
div class="grid grid-cols-3 gap-4"
|
div class="grid grid-cols-3 gap-4"
|
||||||
|
@@ -6,7 +6,7 @@ module Admin
|
|||||||
MEDIA_DIR = "public/media/".freeze
|
MEDIA_DIR = "public/media/".freeze
|
||||||
|
|
||||||
expose :photos_buckets do
|
expose :photos_buckets do
|
||||||
Dir["#{MEDIA_DIR}*"].each_with_object({}) do |root, memo|
|
Dir["#{MEDIA_DIR}*"].reverse.each_with_object({}) do |root, memo|
|
||||||
memo[root.gsub(MEDIA_DIR, "")] = Dir["#{root}/**"]
|
memo[root.gsub(MEDIA_DIR, "")] = Dir["#{root}/**"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user