mirror of
https://github.com/openSUSE/osem.git
synced 2026-04-25 17:27:22 -04:00
For the schedule versioning in the admin interface (having multiple possible shcedules) we need to change some models and associations. It has also been create a rake:move_events_attributes task to migrate the data. User Interface addapted to make use of the introduced associations and models
19 lines
405 B
Ruby
19 lines
405 B
Ruby
module Api
|
|
module V1
|
|
class EventsController < Api::BaseController
|
|
load_resource :conference, find_by: :short_title
|
|
respond_to :json
|
|
|
|
def index
|
|
events = Event.includes(:track, :event_type, event_users: :user)
|
|
|
|
if @conference
|
|
events = events.where(program: @conference.program)
|
|
end
|
|
|
|
respond_with events.confirmed
|
|
end
|
|
end
|
|
end
|
|
end
|