- Change latest weather art limit from 6 to 20 - Shuffle the collection and display the last 10 items - Update the section title to reflect the shuffling This commit enhances the visibility of the latest weather art by increasing the limit of displayed items. It randomizes the selection of the latest art pieces for a more dynamic user experience, while the UI title is updated to clarify this feature. This change improves user engagement with the content.
12 lines
532 B
Ruby
12 lines
532 B
Ruby
class HomeController < ApplicationController
|
|
def index
|
|
@latest_arts = WeatherArt.includes(:city).order(created_at: :desc).limit(20).shuffle.last(10)
|
|
@featured_arts = WeatherArt.includes(:city).order(created_at: :desc).limit(5)
|
|
set_meta_tags(
|
|
title: "AI-Generated Weather Art",
|
|
description: "Experience weather through artistic AI visualization. Daily updated weather art for cities worldwide.",
|
|
keywords: "AI weather art, weather visualization, city weather, artificial intelligence"
|
|
)
|
|
end
|
|
end
|