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
This commit is contained in:
parent
9ff37fe106
commit
1958ac2b10
5 changed files with 32 additions and 1 deletions
|
|
@ -3,7 +3,8 @@
|
|||
class ConferencesController < ApplicationController
|
||||
protect_from_forgery with: :null_session
|
||||
before_action :respond_to_options
|
||||
load_and_authorize_resource find_by: :short_title, except: :show
|
||||
load_and_authorize_resource find_by: :short_title, except: [:show, :feed]
|
||||
skip_authorization_check only: :feed
|
||||
|
||||
def index
|
||||
@current = Conference.upcoming.reorder(start_date: :asc)
|
||||
|
|
@ -108,6 +109,13 @@ class ConferencesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def feed
|
||||
@conferences = Conference.order(created_at: :desc)
|
||||
respond_to do |format|
|
||||
format.rss { render layout: false }
|
||||
end
|
||||
end
|
||||
|
||||
def code_of_conduct; end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue