Event schedule controller pluralized

This commit is contained in:
Ana 2016-08-04 12:19:32 +02:00
parent 33e9c86214
commit c469f4f415
3 changed files with 3 additions and 3 deletions

View file

@ -0,0 +1,26 @@
module Admin
class EventSchedulesController < 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