today_ai_weather/app/controllers/rss_controller.rb
songtianlun 9fe92b1fc4
Some checks failed
Docker / docker (push) Has been cancelled
feat: add RSS feed functionality
- Introduce RssController to handle RSS feed requests
- Add a new route for the RSS feed
- Implement RSS feed view to display weather art
- Update application layout to include RSS feed link
- Set content type for RSS responses

This commit adds an RSS feed feature that allows users to
subscribe to updates on daily AI-generated weather art.
The feed includes the latest weather art and relevant
metadata, enhancing user engagement and accessibility.
2025-02-19 17:38:49 +08:00

10 lines
209 B
Ruby

class RssController < ApplicationController
def feed
@weather_arts = WeatherArt.order(created_at: :desc).limit(20)
respond_to do |format|
format.rss { render layout: false }
end
end
end