1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/controllers/rss/events_controller.rb

12 lines
423 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# RSS feed about 10 last events
2016-09-29 10:53:20 +02:00
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)
2020-05-13 15:02:03 +02:00
@fab_name = Setting.get('fablab_name')
2016-09-29 10:53:20 +02:00
end
end