refactor: update URL generation for weather arts
- Change URL path from '/weather_arts/' to '/weather/' to better reflect the content type. - Enhance code readability by making URL structure more intuitive. This change improves the clarity of the URLs generated for weather art and aligns better with the overall naming conventions.
This commit is contained in:
parent
1624382e37
commit
3e61ecaae5
@ -86,7 +86,7 @@ class SubmitToIndexnowWorker
|
|||||||
WeatherArt.includes(:city).where("updated_at > ?", recently_updated).find_each do |art|
|
WeatherArt.includes(:city).where("updated_at > ?", recently_updated).find_each do |art|
|
||||||
# WeatherArt.includes(:city).find_each do |art|
|
# WeatherArt.includes(:city).find_each do |art|
|
||||||
if art.image.attached?
|
if art.image.attached?
|
||||||
urls << "#{@host}/cities/#{art.city.slug}/weather_arts/#{art.slug}"
|
urls << "#{@host}/cities/#{art.city.slug}/weather/#{art.slug}"
|
||||||
available_locales.each do |locale|
|
available_locales.each do |locale|
|
||||||
urls << "#{@host}/#{locale}/cities/#{art.city.slug}/weather/#{art.slug}"
|
urls << "#{@host}/#{locale}/cities/#{art.city.slug}/weather/#{art.slug}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user