1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

remove order for avoid N+1

This commit is contained in:
Peng DU 2016-06-24 18:36:36 +02:00
parent 702e35650f
commit d64e8a291b

View File

@ -1,5 +1,5 @@
json.extract! @training, :id, :name, :machine_ids, :nb_total_places
json.availabilities @training.availabilities.order('start_at DESC') do |a|
json.availabilities @training.availabilities do |a|
json.id a.id
json.start_at a.start_at.iso8601
json.end_at a.end_at.iso8601