1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

fix bug: cant get list of training reservation

This commit is contained in:
Peng DU 2017-03-28 19:45:36 +02:00
parent 966ada599d
commit 2cc8096236

View File

@ -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