osem-fcy/app/views/conferences/feed.rss.builder
Kushal SM 1958ac2b10 feat: Add public RSS feed for conferences
Users currently have no way to be notified when new conferences are
published on an OSEM instance. This adds an RSS 2.0 feed endpoint at
/feed.rss that lists all conferences ordered by creation date.

The feed action is excluded from CanCanCan authorization so it remains
publicly accessible without authentication, similar to the existing
calendar endpoint.

Also adds an RSS subscribe link to the conferences index page and an
auto-discovery <link> tag in the application layout so RSS readers can
detect the feed automatically.

Fixes #3543
2026-03-18 17:50:52 +01:00

18 lines
580 B
Ruby

xml.instruct! :xml, version: "1.0"
xml.rss version: "2.0" do
xml.channel do
xml.title "#{ENV.fetch('OSEM_NAME', 'OSEM')} - Conferences"
xml.description "Conferences from #{ENV.fetch('OSEM_NAME', 'OSEM')}"
xml.link conferences_url
@conferences.each do |conference|
xml.item do
xml.title conference.title
xml.description conference.description
xml.pubDate conference.created_at.to_fs(:rfc822)
xml.link conference_url(conference.short_title)
xml.guid conference_url(conference.short_title)
end
end
end
end