From 2cc8096236a00b2e10f8a9101d2fd84bae6cbaed Mon Sep 17 00:00:00 2001 From: Peng DU Date: Tue, 28 Mar 2017 19:45:36 +0200 Subject: [PATCH] fix bug: cant get list of training reservation --- app/controllers/api/trainings_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/trainings_controller.rb b/app/controllers/api/trainings_controller.rb index 45ae39af5..9e452b346 100644 --- a/app/controllers/api/trainings_controller.rb +++ b/app/controllers/api/trainings_controller.rb @@ -57,7 +57,7 @@ class API::TrainingsController < API::ApiController def availabilities authorize Training @training = Training.find(params[:id]) - @availabilities = @training.availabilities.includes(slots: {reservation: {user: [:profile, :trainings] }}).order('start_at DESC') + @availabilities = @training.availabilities.includes(slots: {reservations: {user: [:profile, :trainings] }}).order('start_at DESC') end private