feat: add weather art records for Guangzhou
- Update weather date for existing record to 5 days ago - Add new weather art record for 2 days ago with relevant details - Include image attachment for the new weather art This commit adds a second weather art record for Guangzhou reflecting the weather conditions from 2 days ago, along with relevant data including humidity, wind speed, and an updated visual representation.
This commit is contained in:
parent
38884bdaa7
commit
a533390356
25
db/seeds.rb
25
db/seeds.rb
@ -24,7 +24,7 @@ guangzhou = City.create!(
|
||||
|
||||
guangzhou_weather_art = WeatherArt.create!(
|
||||
city: guangzhou,
|
||||
weather_date: Date.today,
|
||||
weather_date: 5.day.ago,
|
||||
description: 'Sunny with some clouds',
|
||||
temperature: 28.5,
|
||||
feeling_temp: 30.2,
|
||||
@ -37,9 +37,30 @@ guangzhou_weather_art = WeatherArt.create!(
|
||||
cloud: 30,
|
||||
prompt: "A sunny day in Guangzhou with modern buildings under blue sky and white clouds, digital art style"
|
||||
)
|
||||
|
||||
guangzhou_weather_art.image.attach(
|
||||
io: File.open("db/seeds/images/sample-guangzhou-weather-art.png"),
|
||||
filename: "sample-guangzhou-weather-art.png",
|
||||
content_type: "image/png"
|
||||
)
|
||||
|
||||
guangzhou_weather_art2 = WeatherArt.create!(
|
||||
city: guangzhou,
|
||||
weather_date: 2.day.ago,
|
||||
description: 'Sunny with some clouds',
|
||||
temperature: 23.21,
|
||||
feeling_temp: 22.11,
|
||||
humidity: 65,
|
||||
wind_scale: "0.7",
|
||||
wind_speed: 15,
|
||||
precipitation: 0,
|
||||
pressure: 1014,
|
||||
visibility: 10000,
|
||||
cloud: 30,
|
||||
prompt: "A clear day in Guangzhou, China. In the foreground, people are walking near the iconic Canton Tower, surrounded by vibrant greenery and modern buildings. The sky is blue with no clouds, and the sun is shining brightly. It's a perfect day, with a temperature of around 23 degrees Celsius. The scene captures the lively atmosphere of the city, showing locals enjoying their day out."
|
||||
)
|
||||
guangzhou_weather_art2.image.attach(
|
||||
io: File.open("db/seeds/images/sample-guangzhou-weather-art-2.png"),
|
||||
filename: "sample-guangzhou-weather-art-2.png",
|
||||
content_type: "image/png"
|
||||
)
|
||||
|
||||
|
BIN
db/seeds/images/sample-guangzhou-weather-art-2.png
Normal file
BIN
db/seeds/images/sample-guangzhou-weather-art-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 MiB |
Loading…
Reference in New Issue
Block a user