osem-fcy/app/controllers/admin/event_schedule_controller.rb
Ana 2e1cd164a4 Load event schedule fixed
It was needed to use the id instead of the guid in the html attributes of the events in the admin schedule
2016-08-11 15:11:27 +02:00

26 lines
652 B
Ruby

module Admin
class EventScheduleController < Admin::BaseController
load_and_authorize_resource :event_schedule
def create
@event_schedule.save
render json: { 'status' => 'ok', event_schedule_id: @event_schedule.id }
end
def update
@event_schedule.update(event_schedule_params)
render json: { 'status' => 'ok', event_schedule_id: @event_schedule.id }
end
def destroy
@event_schedule.destroy
render json: { 'status' => 'ok' }
end
private
def event_schedule_params
params.require(:event_schedule).permit(:schedule_id, :event_id, :room_id, :start_time)
end
end
end