1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

export reservations: eager load reservables

This commit is contained in:
Sylvain 2016-07-12 13:38:35 +02:00
parent 1b17290395
commit bfe04c8be6

View File

@ -99,7 +99,7 @@ class API::MembersController < API::ApiController
# export reservations
def export_reservations
authorize :export
@reservations = Reservation.all.includes(:slots, :user => [:profile])
@reservations = Reservation.all.includes(:slots, :reservable, :user => [:profile])
render xlsx: 'export_reservations.xlsx', filename: "export_reservations.xlsx"
end