mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-11 22:24:21 +01:00
12 lines
423 B
Ruby
12 lines
423 B
Ruby
# frozen_string_literal: true
|
|
|
|
# RSS feed about 10 last events
|
|
class Rss::EventsController < Rss::RssController
|
|
def index
|
|
@events = Event.includes(:event_image, :event_files, :availability, :category)
|
|
.where('availabilities.start_at >= ?', Time.current)
|
|
.order('availabilities.start_at').references(:availabilities).limit(10)
|
|
@fab_name = Setting.get('fablab_name')
|
|
end
|
|
end
|